From:             amonw at hotmail dot com
Operating system: redhat linux 9
PHP version:      4.3.10
PHP Bug Type:     Unknown/Other Function
Bug description:  "1"+"-.1" produce 1

Description:
------------
An numeric string between -1 and 0 and without a leading zero can't be
converted correctly while php 4.2.2 can.

Reproduce code:
---------------
<?php
print "1"+"-.1";
$a="1";
$b="-.1";
print "\n";
print $a+$b;
?>

Expected result:
----------------
-0.9
-0.9

Actual result:
--------------
1
1

-- 
Edit bug report at http://bugs.php.net/?id=31548&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=31548&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=31548&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=31548&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=31548&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=31548&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=31548&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=31548&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=31548&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=31548&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=31548&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=31548&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=31548&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=31548&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=31548&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=31548&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=31548&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=31548&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=31548&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=31548&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=31548&r=mysqlcfg

Reply via email to