ID:               46621
 Updated by:       [EMAIL PROTECTED]
 Reported By:      php dot net at spam dot lublink dot net
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: Gentoo Linux
 PHP Version:      5.2.6
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Enough with the setlocale() and float "bug" reports..


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

[2008-11-19 19:32:53] php dot net at spam dot lublink dot net

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 this bug report at http://bugs.php.net/?id=46621&edit=1

Reply via email to