#23967 [Fbk]: number_format() returns 0 all the time
ID: 23967
Updated by: derick@php.net
Reported By: russ at zerotech dot net
Status: Feedback
Bug Type: Scripting Engine problem
Operating System: Gentoo Linux
PHP Version: 4.3.2
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
Joey, it doesn't crash... so you can not make a backtrace...
Anyway, this should be fixed in the latest CVS, so please try the
snapshot.
Previous Comments:
------------------------------------------------------------------------
[2003-06-02 22:58:41] joey@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
I can't duplicate this. Tried several different GCC versions to no
avail.
------------------------------------------------------------------------
[2003-06-02 20:28:56] russ at zerotech dot net
Also, forgot to add. Earlier in the day I noticed various web
applications that use number_format() were returning either 0, or
random garbage such as:
0.F0
0.:;
0,0;
etc.
------------------------------------------------------------------------
[2003-06-02 20:24:51] russ at zerotech dot net
number_format() returns 0, all the time, regardless of what was
entered.
russ@milton:~$ php -r 'echo number_format(400); echo "\n";';
0
russ@milton:~$ php -r 'echo number_format(600); echo "\n";';
0
russ@milton:~$ php -r 'echo number_format(600, 2); echo "\n";';
0.00
russ@milton:~$ php -r 'echo number_format(600, 5); echo "\n";';
0.00000
russ@milton:~$ php -r 'echo number_format("600", 5); echo "\n";';
0.00000
russ@milton:~$
Also affects the Apache SAPI module, obviously since they make the call
to the same function. Worked fine of course in 4.3.1. I just recently
upgraded to 4.3.2 and noticed it stopped working.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23967&edit=1
Thread (10 messages)