Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class foo {
- private $random = 4;
- function getCallable() {
- $callable = function () {
- echo $this->random;
- };
- return $callable;
- }
- }
- $foo = new foo();
- $callable = $foo->getCallable();
- $callable(); //works fine.
- $provider = new Auryn\Provider();
- $provider->execute($callable, []);
- //Fatal error: Using $this when not in object context in /documents/projects/github/Console/example.php on line 114
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement