Bug #13537 Updated: number_format looses value integrity

From: Date: Thu, 04 Oct 2001 09:53:23 +0000
Subject: Bug #13537 Updated: number_format looses value integrity
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-67255@lists.php.net to get a copy of this message
ID: 13537 Updated by: derick Reported By: assid@assid.com Old Status: Open Status: Bogus Bug Type: *Math Functions Operating System: linux PHP Version: 4.0.6 New Comment: Not a bug When the string "200,000" gets converted to a number when adding, it gets converted to 200 ("," is not a valid char in a number string) Derick Previous Comments: ------------------------------------------------------------------------ [2001-10-04 05:46:25] assid@assid.com try out this code <? $a=number_format(200000); $b=number_format(-2000); $c = $a + $b; echo "$$a is $a <BR> \$b is $b <BR> \$c is $c"; ?> isnt it supposed $c supposed to be 198,000 ? ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=13537&edit=1

« previous php.dev (#67255) next »