ID: 10537
Updated by: derick
Old-Status: Open
Status: Bogus
Bug Type: *Function Specific
PHP Version: 4.0.4pl1
Assigned To: 

This is not a bug, after the first number_format in the second piece, $value is a 
When adding strings, the variabele gets converted back to a integer or float, but 
uonly until the first character that is not in the set [0-9] or .

Previous Comments:

[2001-04-28 12:07:29] [EMAIL PROTECTED]
I finally got some time to write some code to show this...I 
may be wrong in assuming the behaviour, but either way the 
totals are definately wrong.  Here's the snippet:

$value = 1234;

$total = $value + $value;
print number_format($value,2) . " + " . 
number_format($value,2) . " = " . number_format($total,2);

print "<BR><BR>";

$value = number_format($value,2);
$total = $value + $value;
print $value . " + " . $value . " = " . $total;


ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to