Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class someClass {
- private $success = "successn";
- function getReflection() {
- return new ReflectionFunction(function() {
- print $this->success;
- });
- }
- }
- $reflection = (new someClass)->getReflection();
- $reflection->invoke();
- Fatal error: Using $this when not in object context in Command line code on line 5
- call_user_func(Closure::bind(
- $reflection->getClosure(),
- $reflection->getClosureThis(),
- $reflection->getClosureScopeClass()->name));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement