Le 04/04/2024 à 17:57, Tim Düsterhus a écrit :
Hi
On 4/4/24 16:36, Pablo Rauzy wrote:
I strongly agree in theory, but this could break existing code, and
moreover such a proposal was already rejected:
https://wiki.php.net/rfc/strict_argcount
The RFC is 9 years old by now. My gut feeling is be that using an
actual variadic parameter for functions that are variadic is what
people do, because it makes the function signature much clearer.
Actually variadic parameters are available since PHP 5.6, which at the
time of the previous RFC was the newest version. Since then we had two
major releases, one of which (7.x) is already out of support.
I think it would be reasonable to consider deprecating passing extra
arguments to a non-variadic function.
Well, if there is a consensus to agree on that, it would be even better!
Cheers,
--
Pablo