[wp-trac] [WordPress Trac] #11391: logic error bug in php 5.3.0 probably needs attention in WP

WordPress Trac wp-trac at lists.automattic.com
Fri Dec 11 01:27:23 UTC 2009


#11391: logic error bug in php 5.3.0 probably needs attention in WP
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |        Owner:         
     Type:  defect (bug)       |       Status:  closed 
 Priority:  normal             |    Milestone:  2.9    
Component:  General            |      Version:  2.9    
 Severity:  major              |   Resolution:  invalid
 Keywords:                     |  
-------------------------------+--------------------------------------------
Changes (by nacin):

  * status:  new => closed
  * resolution:  => invalid


Comment:

 With emphasis added, the following is from
 http://www.php.net/manual/en/language.types.string.php#language.types.string.conversion.
 This appears to be PHP in general, not a PHP 5.3 change.

 ----

 == String conversion to numbers ==

 When a string is evaluated in a numeric context, the resulting value and
 type are determined as follows.

 If the string does not contain any of the characters '.', 'e', or 'E' and
 the numeric value fits into integer type limits (as defined by
 PHP_INT_MAX), the string will be evaluated as an integer. In all other
 cases it will be evaluated as a float.

 The value is given by the initial portion of the string. '''''If the
 string starts with valid numeric data, this will be the value used.
 Otherwise, the value will be 0 (zero).''''' Valid numeric data is an
 optional sign, followed by one or more digits (optionally containing a
 decimal point), followed by an optional exponent. The exponent is an 'e'
 or 'E' followed by one or more digits.

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


More information about the wp-trac mailing list