php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61256 Hex numbers parsing error
Submitted: 2012-03-02 23:15 UTC Modified: 2012-03-03 14:56 UTC
From: balancer at balancer dot ru Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.3.10 OS: Gentoo Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: balancer at balancer dot ru
New email:
PHP Version: OS:

 

 [2012-03-02 23:15 UTC] balancer at balancer dot ru
Description:
------------
Incorrect parsing 0xNN numbers with operators

Test script:
---------------
$ php -r 'var_dump(0x0+1);'
int(2)
$ php -r 'var_dump(0x0 + 1);'
int(1)
$ php -r 'var_dump(0x0+10);'
int(26)
$ php -r 'var_dump(0x0 + 10);'
int(10)
$ php -r 'var_dump(0x0-10);'
int(-26)
$ php -r 'var_dump(0x0 - 10);'
int(-10)



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-03 14:56 UTC] pierrick@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

This bug is the same as #61095 which was fixed.
 [2012-03-03 14:56 UTC] pierrick@php.net
-Status: Open +Status: Not a bug
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 06 17:02:17 2025 UTC