On 14/05/2021 22:48, Aaron Piotrowski wrote:
I think it’s reasonable to allow passing more arguments to a partial since 
user-defined functions and closures allow this without error.

But only userland functions, a relic from when func_get_args was the only way to handle varaible numbers of arguments.

The documentation officially discourages func_get_args in favour of ...$ so I can definitely forsee the option of us deprecating that mechanism sometime in 8.x and and removing it in 9.0.

I don't think it likely that it would go the other way of allowing unlimited arguments to internal functions.

That being the case, IMO it makes more sense to introduce partials with the same behaviour as internal functions, passing more functions than specified (including partial arguments) should error.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to