Bug #61095 [Opn->Asn]: PHP can't add hex numbers
| From: | colder@php.net | Date: | Wed, 15 Feb 2012 16:55:37 +0000 |
| Subject: | Bug #61095 [Opn->Asn]: PHP can't add hex numbers | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-167543@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61095&edit=1
ID: 61095
Updated by: colder@php.net
Reported by: tomek at przeslij dot pl
Summary: PHP can't add hex numbers
-Status: Open
+Status: Assigned
Type: Bug
-Package: Math related
+Package: Scripting Engine problem
Operating System: Windows XP
PHP Version: 5.3.10
-Assigned To:
+Assigned To: colder
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2012-02-15 16:24:03] nikic@php.net
Nice catch!
This can be fixed by adding a len == 0 check after the while loop in http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_language_scanner.l#1515
(and returning 0 in that case).
------------------------------------------------------------------------
[2012-02-15 15:54:47] anon at anon dot anon
That is fan-tastic!
http://i.imgur.com/uPC2b.gif
------------------------------------------------------------------------
[2012-02-15 15:32:20] tomek at przeslij dot pl
Description:
------------
These echoes 4:
echo (0x00+2);
echo (0x00+0x02);
but they should echo 2! This echoes 2 as expected:
echo (0x00 + 2);
Test script:
---------------
echo (0x00+2);
Expected result:
----------------
2
Actual result:
--------------
4
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61095&edit=1