[wp-trac] [WordPress Trac] #14424: Eliminate dynamic function definitions, ie create_function

WordPress Trac noreply at wordpress.org
Fri Oct 18 14:32:17 UTC 2013


#14424: Eliminate dynamic function definitions, ie create_function
-----------------------------+-----------------------------
 Reporter:  ScottMac         |       Owner:  westi
     Type:  enhancement      |      Status:  accepted
 Priority:  normal           |   Milestone:  Future Release
Component:  Optimization     |     Version:  3.0
 Severity:  normal           |  Resolution:
 Keywords:  ongoing-project  |
-----------------------------+-----------------------------
Changes (by rmccue):

 * keywords:  ongoing-project has-patch => ongoing-project


Comment:

 PHP is [http://marc.info/?t=138178649200002&r=1&w=2 considering
 deprecating] `create_function` in 5.6 (~2015). This isn't accepted or
 anywhere close yet, but as a matter of best practice, we should avoid
 using it in core.

 With the exception of the usage in POMO and `wp_generate_tag_cloud`, these
 seem pretty trivial to convert to normal functions. Alternatively, we can
 wait until it's accepted and nearing release, by which point I hazard a
 guess we can consider 5.3+ with closures anyway.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/14424#comment:23>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list