Re: RFC idea: using the void type to control maximum arity of user-defined functions
| From: | Kamil Tekiela | Date: | Thu, 04 Apr 2024 13:10:48 +0000 |
| Subject: | Re: RFC idea: using the void type to control maximum arity of user-defined functions | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-122930@lists.php.net to get a copy of this message | ||
Hi Pablo,
Interesting proposal, but immediately I have two questions:
1. Why is passing extra arguments a problem at all? Is generating a
warning a good idea? If you would like to introduce a new syntax to
enforce non-variadic functions, shouldn't it be a runtime error then?
Generating a warning makes it look like the new syntax still allows
for variadic arguments, but passing the extra arguments now is somehow
a bad thing to do.
2. How does this affect func_get_args()? Will the function stop
working or continue working as before?
Regards,
Kamil