#23967 [Opn]: number_format() returns 0 all the time

From: Date: Tue, 03 Jun 2003 01:28:56 +0000
Subject: #23967 [Opn]: number_format() returns 0 all the time
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-40981@lists.php.net to get a copy of this message
ID: 23967 User updated by: russ at zerotech dot net Reported By: russ at zerotech dot net Status: Open Bug Type: Scripting Engine problem Operating System: Gentoo Linux PHP Version: 4.3.2 New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#40981) next »