php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61225 0b0+1 = 2
Submitted: 2012-03-01 19:20 UTC Modified: 2012-03-02 02:37 UTC
From: clicky at erebot dot net Assigned: pierrick (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 5.4SVN-2012-03-01 (snap) OS: Irrelevant
Private report: No CVE-ID: None
 [2012-03-01 19:20 UTC] clicky at erebot dot net
Description:
------------
While a patch was issued for bug #61095 (0x0*+<NUM> leading to incorrect results), the same issue still exists for the new binary notation introduced in PHP 5.4.0.


Test script:
---------------
var_dump(0b0+1);

Expected result:
----------------
int(1)

Actual result:
--------------
int(2)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-02 02:36 UTC] pierrick@php.net
Automatic comment from SVN on behalf of pierrick
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=323763
Log: Fixed bug #61225 (Lexing 0b0*+&lt;NUM&gt; incorectly)
 [2012-03-02 02:37 UTC] pierrick@php.net
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.


 [2012-03-02 02:37 UTC] pierrick@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: pierrick
 [2012-04-18 09:45 UTC] laruence@php.net
Automatic comment on behalf of pierrick
Revision: http://git.php.net/?p=php-src.git;a=commit;h=1953161b8ce3d20bebb59f35a5da7f9db95e4986
Log: Fixed bug #61225 (Lexing 0b0*+&lt;NUM&gt; incorectly)
 [2012-07-24 23:37 UTC] rasmus@php.net
Automatic comment on behalf of pierrick
Revision: http://git.php.net/?p=php-src.git;a=commit;h=1953161b8ce3d20bebb59f35a5da7f9db95e4986
Log: Fixed bug #61225 (Lexing 0b0*+&lt;NUM&gt; incorectly)
 [2013-11-17 09:33 UTC] laruence@php.net
Automatic comment on behalf of pierrick
Revision: http://git.php.net/?p=php-src.git;a=commit;h=1953161b8ce3d20bebb59f35a5da7f9db95e4986
Log: Fixed bug #61225 (Lexing 0b0*+&lt;NUM&gt; incorectly)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 03:01:29 2024 UTC