Re: Deprecation of func_get_args(), call_user_func_array() and related API

From: Date: Sat, 11 Oct 2014 22:47:31 +0000
Subject: Re: Deprecation of func_get_args(), call_user_func_array() and related API
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-77884@lists.php.net to get a copy of this message
On 11 Oct 2014, at 23:42, Rowan Collins <rowan.collins@gmail.com> wrote: > func_get_args() and func_num_args(), OTOH, existed solely to support variadics, and anything > taking advantage of them being functions rather than a language structure would have to be quite > exotic and arcane, so in principle they could, eventually, be removed, but I agree with others that > it's far too soon to remove a feature which has been around since 4.0 just becuase 5.6 includes > a better alternative. They have some (admittedly limited) use beyond variadics. If you make a function and later make it redirect to another, you can preserve your typehints by using func_get_args() rather than using the … syntax. > If they're included in the core distribution, then why make them optional at all? If > it's just a question of how the functions behave, then surely an included (and C-level) > implementation should be sought which has the better behaviour? This matches my own thoughts. There is nothing wrong with these functions. There are just some issues with their implementation. We do not need to get rid of the functions, that would be an absurd overreaction. We should just fix the implementations. -- Andrea Faulds http://ajf.me/

« previous php.internals (#77884) next »