Re: [RFC] Partial Function Application v2

From: Date: Mon, 07 Jul 2025 17:30:27 +0000
Subject: Re: [RFC] Partial Function Application v2
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-127946@lists.php.net to get a copy of this message
> My only question: why does this implementation care if you specify too many arguments when PHP
> doesn’t care if you call a function with too many arguments?

That is only true for userland functions, by the way. Internal
functions do care. Historically, we could not do anything about this
because variadic functions were only introduced in 5.6, so many
functions did not specify that they were variadic and just used
func_get_args(). Additionally, some people think it should be unified
the other way--internal functions should accept extra args.

Anyway, there you go on some history and reasoning of why it is the way it is.


Thread (54 messages)

« previous php.internals (#127946) next »