Re: RFC idea: using the void type to control maximum arity of user-defined functions
| From: | Tim Düsterhus | Date: | Thu, 04 Apr 2024 15:57:01 +0000 |
| Subject: | Re: RFC idea: using the void type to control maximum arity of user-defined functions | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-122939@lists.php.net to get a copy of this message | ||
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_argcountThe 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. Best regards Tim Düsterhus