Advertisement
Guest User

Untitled

a guest
Oct 25th, 2014
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. class someClass {
  2. private $success = "successn";
  3. function getReflection() {
  4. return new ReflectionFunction(function() {
  5. print $this->success;
  6. });
  7. }
  8. }
  9. $reflection = (new someClass)->getReflection();
  10. $reflection->invoke();
  11.  
  12. Fatal error: Using $this when not in object context in Command line code on line 5
  13.  
  14. call_user_func(Closure::bind(
  15. $reflection->getClosure(),
  16. $reflection->getClosureThis(),
  17. $reflection->getClosureScopeClass()->name));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement