[wp-trac] [WordPress Trac] #17522: ms-blogs dynamic strings to static strings

WordPress Trac wp-trac at lists.automattic.com
Fri May 20 23:19:38 UTC 2011


#17522: ms-blogs dynamic strings to static strings
-----------------------------------------------+---------------------------
 Reporter:  niallkennedy                       |       Owner:
     Type:  enhancement                        |      Status:  new
 Priority:  normal                             |   Milestone:  Awaiting
Component:  Multisite                          |  Review
 Severity:  normal                             |     Version:
 Keywords:  has-patch reporter-feedback close  |  Resolution:
-----------------------------------------------+---------------------------

Comment (by niallkennedy):

 Initial patch corrects for
 [http://codex.wordpress.org/WordPress_Coding_Standards#Single_and_Double_Quotes
 WordPress Coding Standards for strings]:
   If you're not evaluating anything in the string, use single quotes.

 Variables and escape sequences for special characters are not expanded
 when they occur in single-quoted
 [http://php.net/manual/en/language.types.string.php strings]. So you would
 think not having to look for extra things within a string declaration
 would process more quickly. We can run some tests and confirm the
 performance angle. string-test.php added to ticket. In my PHP 5.3 CLI
 tests the single quoted strings were faster. "Non-trivial" up for debate.

 Patch is admittedly trivial compared to rewriting Media or something
 similar. Yet if I'm already inside a file and notice something not to
 Coding Standards or capable of making a few million websites run
 nanoseconds faster I figure why not flag the diff and improve the
 software.

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


More information about the wp-trac mailing list