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