bug71442.phpt 615 B

12345678910111213141516171819202122232425262728293031323334353637
  1. --TEST--
  2. Bug #71442 (forward_static_call crash)
  3. --FILE--
  4. <?php
  5. class A
  6. {
  7. const NAME = 'A';
  8. public static function test() {
  9. $args = func_get_args();
  10. echo static::NAME, " ".join(',', $args)." \n";
  11. }
  12. }
  13. class B extends A
  14. {
  15. const NAME = 'B';
  16. public static function test() {
  17. echo self::NAME, "\n";
  18. forward_static_call(array('A', 'test'), 'more', 'args');
  19. forward_static_call( 'test', 'other', 'args');
  20. }
  21. }
  22. B::test('foo');
  23. function test() {
  24. $args = func_get_args();
  25. echo "C ".join(',', $args)." \n";
  26. }
  27. ?>
  28. --EXPECT--
  29. B
  30. B more,args
  31. C other,args