Edit report at https://bugs.php.net/bug.php?id=61095&edit=1
ID: 61095 Updated by: col...@php.net Reported by: tomek at przeslij dot pl Summary: PHP can't add hex numbers -Status: Assigned +Status: Closed Type: Bug Package: Scripting Engine problem Operating System: Windows XP PHP Version: 5.3.10 Assigned To: colder Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2012-02-24 01:16:56] admin at jesus dot de NOT reproduced in older version: # php -r 'echo (0x00+2);echo "\n";' 2 # php -r 'echo (0x00+ 2);echo "\n";' 2 # php -r 'echo (0x00 + 2);echo "\n";' 2 # php -r 'echo (0x00 +2);echo "\n";' 2 # php -v PHP 5.2.6-1+lenny13 with Suhosin-Patch 0.9.6.2 (cli) (built: Jul 1 2011 17:03:36) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies ------------------------------------------------------------------------ [2012-02-23 22:53:09] yk4ever at gmail dot com It is already fixed in the trunk and relevant version branches. ------------------------------------------------------------------------ [2012-02-23 21:55:46] jordan dot sherer at definition6 dot com Reproduced, but after adding spaces around the + it works as intended. $ php -r 'echo (0x00+2);echo "\n";' 4 $ php -r 'echo (0x00 + 2);echo "\n";' 2 $ php -v PHP 5.3.8 with Suhosin-Patch (cli) (built: Nov 15 2011 15:33:15) Copyright (c) 1997-2011 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies ------------------------------------------------------------------------ [2012-02-23 20:40:21] balthasar dot reuter at cs dot fau dot de Behavior reproduced: $ php -r 'echo (0x00+2);echo "\n";' 4 $ php -r 'echo (0x00+ 2);echo "\n";' 2 $ php -r 'echo (0x00 + 2);echo "\n";' 2 $ php -r 'echo (0x00 +2);echo "\n";' 4 $ php -v PHP 5.3.8 (cli) (built: Dec 5 2011 21:24:09) Copyright (c) 1997-2011 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies Mac OS X 10.6.8 ------------------------------------------------------------------------ [2012-02-23 20:14:37] phpbug at vincent dot sh Lexer level ? Russian. http://goo.gl/eqxZ8 ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=61095 -- Edit this bug report at https://bugs.php.net/bug.php?id=61095&edit=1