Hello, internals!
I have a question about changed behavior in 7.0 for matching signature of
variadic method.
Here is an example of code:
class Foo {
public static function test($bar = null) {
var_dump(func_get_args());
}
}
class Baz extends Foo {
public static function test(...$args) {
parent::test(...$args);
}
}
Baz::test();
Baz::test('hello');
For 5.6 this code works normally, but in 7.0 it produces a warning about
signature: "Warning: Declaration of Baz::test(...$args) should be
compatible with Foo::test($bar = NULL)"
See https://3v4l.org/so6P2
>From userland point of view, these signatures should be compatible, so I
decided to check this behavior, was it intended or not.
Thanks!