bug67938.phpt 492 B

1234567891011121314151617181920212223242526272829
  1. --TEST--
  2. Bug #67938: Segfault when extending interface method with variadic
  3. --FILE--
  4. <?php
  5. interface TestInterface {
  6. public function foo();
  7. public function bar(array $bar);
  8. }
  9. class Test implements TestInterface {
  10. public function foo(...$args) {
  11. echo __METHOD__, "\n";
  12. }
  13. public function bar(array $bar, ...$args) {
  14. echo __METHOD__, "\n";
  15. }
  16. }
  17. $obj = new Test;
  18. $obj->foo();
  19. $obj->bar([]);
  20. $obj->bar([], 1);
  21. ?>
  22. --EXPECT--
  23. Test::foo
  24. Test::bar
  25. Test::bar