Re: Deprecation of func_get_args(), call_user_func_array() and related API
| From: | Rowan Collins | Date: | Sat, 11 Oct 2014 22:42:46 +0000 |
| Subject: | Re: Deprecation of func_get_args(), call_user_func_array() and related API | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-77883@lists.php.net to get a copy of this message | ||
On 11/10/2014 04:10, Marco Pivetta wrote:
That would actually be worse, as it wouldn't be possible to pass them to methods with aThat sounds like a good counter to your own argument that there is no use-case for these functions. Indeed, there are plenty of use cases for call_user_func() and call_user_func_array() which have nothing whatsoever to do with variadics, so are as valid as they ever were. 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.callablehint or similars such asarray_map.
In general, I understand why there's a lot of fuss about BC compat here, but I don't see why providing them as separate file or using something like a "global include" is a problem. Is/would something like that (be) possible via ini setting?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? Regards, -- Rowan Collins [IMSoP]