ID:               41517
 Updated by:       [EMAIL PROTECTED]
 Reported By:      nikhil dot gupta at in dot ibm dot com
-Status:           Open
+Status:           Closed
 Bug Type:         *Unicode Issues
 Operating System: Linux, Win32-xp
 PHP Version:      6CVS-2007-05-28 (snap)
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2007-05-28 12:17:19] nikhil dot gupta at in dot ibm dot com

Description:
------------
When a string starting with number (eg. "22.23abc") is given as input
to floatval() function, no output is generated with PHP6 unicode ON
whereas it outputs correct result with php5 and php6 when unicode is
OFF. According to documentation, this type of string is acceptable by
the function. Hence there should be output with PHP6 with both modes
(unicode ON and OFF).

Reproduce code:
---------------
--TEST--

--FILE--
<?php
$string = "22.34abcd";
var_dump( floatval($string) );
?>
--EXPECT--

Expected result:
----------------
Notice: A non well formed numeric value encountered in %s on line %d
float(22.34)

Actual result:
--------------
Warning: floatval() expects parameter 1 to be double, Unicode string
given in %s on line %d
NULL


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=41517&edit=1

Reply via email to