From:             nikhil dot gupta at in dot ibm dot com
Operating system: Linux, Win32-xp
PHP version:      6CVS-2007-05-28 (snap)
PHP Bug Type:     *Unicode Issues
Bug description:  floatval() function donot output the result in PHP6 with 
Unicode ON.

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 bug report at http://bugs.php.net/?id=41517&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=41517&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=41517&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=41517&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=41517&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=41517&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=41517&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=41517&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=41517&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=41517&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=41517&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=41517&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=41517&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=41517&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=41517&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=41517&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=41517&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=41517&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=41517&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=41517&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=41517&r=mysqlcfg

Reply via email to