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

From: Date: Tue, 03 Jun 2003 01:24:51 +0000
Subject: #23967 [NEW]: number_format() returns 0 all the time
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-40980@lists.php.net to get a copy of this message
From:             russ at zerotech dot net
Operating system: Gentoo Linux
PHP version:      4.3.2
PHP Bug Type:     Scripting Engine problem
Bug description:  number_format() returns 0 all the time

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 bug report at http://bugs.php.net/?id=23967&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=23967&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=23967&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=23967&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=23967&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=23967&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=23967&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=23967&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=23967&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=23967&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=23967&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23967&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=23967&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=23967&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=23967&r=gnused



Thread (10 messages)

« previous php.bugs (#40980) next »