Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Foo
- {
- public function __call($method, $args)
- {
- var_dump( $method );
- var_dump( $args );
- call_user_func_array($this->thing, $args);
- }
- public function thing( $arg1, $arg2 )
- {
- echo "You called the \"thing\" function with arg1 = {$arg1} && arg2 = {$arg2}";
- }
- }
- $foo = new Foo;
- $foo->blah("bar", "sed")
- ?>
Add Comment
Please, Sign In to add comment