Req #50648 [Opn->Csd]: Format for binary numbers
| From: | pajoye@php.net | Date: | Wed, 27 Jul 2011 00:16:10 +0000 |
| Subject: | Req #50648 [Opn->Csd]: Format for binary numbers | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-162205@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=50648&edit=1
ID: 50648
Updated by: pajoye@php.net
Reported by: robert_xp at gmx dot net
Summary: Format for binary numbers
-Status: Open
+Status: Closed
Type: Feature/Change Request
Package: Scripting Engine problem
-PHP Version: 5.3.1
+PHP Version: 5.4
-Assigned To:
+Assigned To: pajoye
Block user comment: N
Private report: N
New Comment:
I applied the pach to 5.4 and trunk. Thanks for your work!
It would rock if you would have some time to add some test cases, string
conversion, etc.
Previous Comments:
------------------------------------------------------------------------
[2010-11-11 07:15:50] jonah dot harris at gmail dot com
Per discussion, two patches are attached:
- php-src-5.3-50648_p1.patch is a subset and clean up of Robert's original patch
for binary notation of integer support.
- phpdoc-50648_p1.patch is an English documentation update.
NOTE: re2c will have to be run post-patch and pre-commit because the re2c-related
diffs could not be included as they pushed the patch size over 100K.
------------------------------------------------------------------------
[2010-01-04 11:50:15] robert_xp at gmx dot net
Description:
------------
I think it would be a good improvement to have a short form for binary numbers like C# with
0b101010. More information and a patch is provided here: http://www.xarg.org/2009/12/php-hacking/
Reproduce code:
---------------
0b0000101
Expected result:
----------------
5
Actual result:
--------------
compile-error
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=50648&edit=1