call_static.phpt 424 B

1234567891011121314151617181920
  1. --TEST--
  2. __callStatic() Magic method
  3. --FILE--
  4. <?php
  5. class Test
  6. {
  7. static function __callStatic($fname, $args)
  8. {
  9. echo $fname, '() called with ', count($args), " arguments\n";
  10. }
  11. }
  12. call_user_func("Test::Two", 'A', 'B');
  13. call_user_func(array("Test", "Three"), NULL, 0, false);
  14. Test::Four(5, 6, 7, 8);
  15. ?>
  16. --EXPECT--
  17. Two() called with 2 arguments
  18. Three() called with 3 arguments
  19. Four() called with 4 arguments