1. class foo
  2. {
  3. public function test()
  4. {
  5. call_user_func_array(array($this, "bar"), array("three", "four"));
  6. }
  7. public function bar($arg, $arg2)
  8. {
  9. echo __METHOD__, " got $arg and $arg2\n";
  10. }
  11. }
  12. // Call the $foo->bar() method with 2 arguments
  13. $foo = new foo;
  14. $foo->test();

分类: web

标签:   php