Guest User

Untitled

a guest
May 28th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. <?php
  2. class A {
  3. public $v = 1;
  4.  
  5. public function func() {
  6. call_user_func(array($this, 'some'));
  7. }
  8. public function some() {
  9. echo $this->v;
  10. }
  11. }
  12.  
  13. $obj = new A;
  14. $obj->v = 2;
  15. $obj->func();
Add Comment
Please, Sign In to add comment