[wp-trac] [WordPress Trac] #16684: PHP5 Performance improvement for wptexturize

WordPress Trac wp-trac at lists.automattic.com
Sun Feb 27 04:06:06 UTC 2011


#16684: PHP5 Performance improvement for wptexturize
--------------------------+-----------------------------
 Reporter:  solarissmoke  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:  php5 has-patch
--------------------------+-----------------------------
 Now that we have ditched PHP4 we can do `foreach()` loops passing array
 elements by reference. Currently in `wptexturize()` we make a copy of each
 array element from `$textarr` and then write to a separate `$output`
 variable. In PHP5 this is unnecessary as we can work directly on the
 elements of `$textarr`.

 I'm guessing this will need unit tests but it certainly should be more
 efficient.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16684>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list