ID:               49764
 Updated by:       j...@php.net
-Summary:          number_format
 Reported By:      tec at baufi24 dot de
-Status:           Open
+Status:           Feedback
 Bug Type:         Math related
 Operating System: Windows Server 2003 RC2
 PHP Version:      5.2.11
 New Comment:

Please try using this snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/




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

[2009-10-04 08:55:27] tec at baufi24 dot de

Description:
------------
Using number_format will sometimes produce a very hard error. This
phenomenon is not persistent. Sometimes i will see that, but i dont know
what conditions are necessary to reproduce

Reproduce code:
---------------
$value = 2900;
echo "Unformated: ".$value."<br />";
echo "Using number_format: ".number_format($value, 2, ',', '.')."<br
/>";
echo "Crosscheck: ".number_format(2900, 2, ',', '.')."<br />";

Expected result:
----------------
Unformated: 2900
Using number_format: 2.900,00
Crosscheck: 2.900,00

Actual result:
--------------
Unformated: 2900
Using number_format: 2.8:0,00
Crosscheck: 2.8:0,00


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


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

Reply via email to