Re: [RFC] Syntax for variadic functions

From: Date: Wed, 28 Aug 2013 20:12:33 +0000
Subject: Re: [RFC] Syntax for variadic functions
References: 1 2  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message


Am 28.08.2013 21:27, schrieb Matthew Leverton:
> On Wed, Aug 28, 2013 at 10:47 AM, Nikita Popov <[email protected]> wrote:
>> <snip>
> 
> Would any functions get deprecated as a result of this? e.g., func_get_args()
> 
> <snip>
> 

It's not a good idea to deprecate the function
func_get_args/func_num_args() because it is used in user land code to
detect if a function was called with a specific argument like the following:

function (&$argByRef = null) {
    if (func_num_args() > 1) {
        // do expensive stuff to set $argByRef
        $argByRef = true;
    }
    return false;
}


Thread (24 messages)

« previous php.internals (#68647) next »