History log of /PHP-8.2/Zend/tests/variadic/illegal_variadic_override_ref.phpt (Results 1 – 1 of 1)
Revision Date Author Comments
# e72bf636 06-Jan-2020 Nikita Popov

Allow variadic arguments to replace non-variadic ones

Any number of arguments can be replaced by a variadic one, so
long as the variadic argument is compatible (in the sense of
contr

Allow variadic arguments to replace non-variadic ones

Any number of arguments can be replaced by a variadic one, so
long as the variadic argument is compatible (in the sense of
contravariance) with the subsumed arguments.

In particular this means that function(...$args) becomes a
near-universal signature: It is compatible with any function
signature that does not accept parameters by-reference.

This also fixes bug #70839, which describes a special case.

Closes GH-5059.

show more ...