Re: Proposal to deprecate create_function()
| From: | Ryan McCue | Date: | Fri, 18 Oct 2013 13:26:16 +0000 |
| Subject: | Re: Proposal to deprecate create_function() | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-69679@lists.php.net to get a copy of this message | ||
Nikita Popov wrote:
> I tried to look on Github what people currently use create_function for,
> but with little success. Nearly all results I get are uses in the php
> testsuite (copied over to various projects). The only other use case I saw
> was in conjunction with the WordPress add_action() function. In this case
> the create_function call could always be replaced directly with an
> anonymous function (i.e. it didn't need any magic create_function
> capabilities).
I can say with confidence that if this gets in to PHP, we'll integrate
BC support as above (although probably some function name like
_wp_anonymous_function_$i), and the only real reason we still have
this is 5.2 support.
I suspect by the time 5.next rolls around, we'll be at least considering
dropping 5.2, but that of course depends on usage. At the very least,
the plugin ecosystem is starting to look towards dropping 5.2 support,
which is where the big issue will be anyway, so that's nice.
(FWIW, I always hated the create_function() calls in WordPress anyway.)
--
Ryan McCue
<http://ryanmccue.info/>