#31889 [Bgs->Fbk]: Strings of the format -.55 are not converted to numbers correctly
| From: | tony2001@php.net | Date: | Tue, 08 Feb 2005 22:37:12 +0000 |
| Subject: | #31889 [Bgs->Fbk]: Strings of the format -.55 are not converted to numbers correctly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-73672@lists.php.net to get a copy of this message | ||
ID: 31889
Updated by: tony2001@php.net
Reported By: justinpatrin@php.net
-Status: Bogus
+Status: Feedback
Bug Type: Unknown/Other Function
Operating System: Linux
PHP Version: 4.3.10
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2005-02-08 23:35:11] helly@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
read your code again
------------------------------------------------------------------------
[2005-02-08 22:49:30] justinpatrin@php.net
Description:
------------
A string which holds a number which is less than 0 but greater than -1
and does not have a leading 0, is not converted to a number correctly,
it comes back as 0.
Reproduce code:
---------------
$str = '-.55';
echo $str."\n".(int)$str;
Expected result:
----------------
-.55
-.55
Actual result:
--------------
-.55
0
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31889&edit=1