Guest User

Untitled

a guest
Jun 22nd, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. <?php
  2.  
  3. class Foo
  4. {
  5.  
  6. public function __call($method, $args)
  7. {
  8. var_dump( $method );
  9. var_dump( $args );
  10.  
  11. call_user_func_array($this->thing, $args);
  12. }
  13.  
  14. public function thing( $arg1, $arg2 )
  15. {
  16. echo "You called the \"thing\" function with arg1 = {$arg1} && arg2 = {$arg2}";
  17. }
  18.  
  19. }
  20.  
  21.  
  22. $foo = new Foo;
  23.  
  24. $foo->blah("bar", "sed")
  25.  
  26. ?>
Add Comment
Please, Sign In to add comment