[wp-trac] [WordPress Trac] #9930: is_serialized() returns false on serialized doubles

WordPress Trac wp-trac at lists.automattic.com
Tue Dec 22 13:49:35 UTC 2009


#9930: is_serialized() returns false on serialized doubles
---------------------------------+------------------------------------------
 Reporter:  vladimir_kolesnikov  |        Owner:  westi   
     Type:  defect (bug)         |       Status:  reopened
 Priority:  normal               |    Milestone:  3.0     
Component:  General              |      Version:          
 Severity:  minor                |   Resolution:          
 Keywords:  needs-patch          |  
---------------------------------+------------------------------------------

Comment(by Denis-de-Bernardy):

 k... 9930.2.diff does the following:

  - it extends the second regex so that it catches doubles like 1E+1.
  - it reduces backtracking for the second regex

 more specifically for the second:

  - an anchored regexp is very fast, unless it needs to match the entire
 string (as it currently does)
  - substr() is very fast, and it's trivial to see if a string has one out
 of two values

 so by splitting the test in two, we get the same semantics and we make it
 faster and less resource hungry.

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


More information about the wp-trac mailing list