Bug #49764 [Com]: number_format() fails (randomly?)

[email protected] ("derek dot ethier at humber dot ca")
Newsgroups php.bugs
Message-ID <[email protected]>
Edit report at http://bugs.php.net/bug.php?id=49764&edit=1

 ID:               49764
 Comment by:       derek dot ethier at humber dot ca
 Reported by:      tec at baufi24 dot de
 Summary:          number_format() fails (randomly?)
 Status:           No Feedback
 Type:             Bug
 Package:          Math related
 Operating System: Windows Server 2003 RC2
 PHP Version:      5.2.11

 New Comment:

I've been experiencing a similar problem on 5.2.12 and 5.2.13 on a
Windows Server 2003 environment (not R2).

I haven't been able to nail down any sort of specifics as it happens so
randomly. The only consistent element seems to centre around odd numbers
(specifically with 9) format incorrectly in a similar manner to the one
originally described (with a colon in the middle).

I'm not sure if this helps at all, but I thought I'd add a comment
anyway.


Previous Comments:
------------------------------------------------------------------------
[2009-12-21 01:00:01] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------
[2009-12-13 18:13:29] [email protected]

Please try using this snapshot:

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

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



------------------------------------------------------------------------
[2009-10-12 01:00:00] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------
[2009-10-04 18:03:36] [email protected]

Please try using this snapshot:

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

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



------------------------------------------------------------------------
[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/bug.php?id=49764&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.