From: php dot net at spam dot lublink dot net Operating system: Gentoo Linux PHP version: 5.2.6 PHP Bug Type: Scripting Engine problem Bug description: Float conversion in french breaks PHP
Description: ------------ In French, it is written "0,05" not "0.05". When in French, converting a string to a float causes values to be truncated. I have two servers that I tested this on. One is running Gentoo, the other is running Ubuntu. Reproduce code: --------------- <?php setlocale(LC_ALL, 'fr_FR'); var_dump ( (string)(float) "0.01" ) ; var_dump ( (float)(string)(float)(string)(float) "0.01" ) ; ?> Expected result: ---------------- string(4) "0,01" float(0,01) Actual result: -------------- string(4) "0,01" float(0) -- Edit bug report at http://bugs.php.net/?id=46621&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46621&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46621&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46621&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46621&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46621&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=46621&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46621&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46621&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46621&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46621&r=support Expected behavior: http://bugs.php.net/fix.php?id=46621&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46621&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46621&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46621&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46621&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46621&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46621&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46621&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46621&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46621&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46621&r=mysqlcfg