Re: Proposal to deprecate create_function()

From: Date: Fri, 18 Oct 2013 14:02:10 +0000
Subject: Re: Proposal to deprecate create_function()
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-69683@lists.php.net to get a copy of this message
Rowan Collins wrote: > That's interesting to hear - I have no knowledge of the Wordpress > community and decision-making apparatus, so wasn't sure what the > reaction would be. While digging around for references, I did find this > ticket about removing a lot of the create_functions from core: > http://core.trac.wordpress.org/ticket/14424 For context, one of the big uses was returning static values, like true/false/etc. We now have __return_false()/__return_empty_array()/etc for those uses. We also discourage it from being used for callbacks, as the runtime-generated-naming means it's impossible to later remove it without a variable reference to the name (ditto for closures, but people typically only use those in development, not production). There's only one place I can think of in the plugin community where it's still used a fair bit (widget registration), but we can work on discouraging that and there's a fair amount of time until the next release in any case. Personal +1 on this. -- Ryan McCue <http://ryanmccue.info/>

« previous php.internals (#69683) next »