php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #50648
Patch php-src-trunk-50648_p2.patch revision 2010-11-29 16:36 UTC by jonah dot harris at gmail dot com
Patch php-src-5.3-50648_p1.patch revision 2010-11-11 06:06 UTC by jonah dot harris at gmail dot com
Patch phpdoc-50648_p1.patch revision 2010-11-11 05:08 UTC by jonah dot harris at gmail dot com

Patch phpdoc-50648_p1.patch for Scripting Engine problem Bug #50648

Patch version 2010-11-11 05:08 UTC

Return to Bug #50648 | Download this patch
Patch Revisions:

Developer: jonah.harris@gmail.com

diff -ru phpdoc/en/trunk/language/types/integer.xml phpdoc-50648/en/trunk/language/types/integer.xml
--- phpdoc/en/trunk/language/types/integer.xml	2010-11-10 23:48:09.000000000 -0500
+++ phpdoc-50648/en/trunk/language/types/integer.xml	2010-11-10 23:55:32.000000000 -0500
@@ -35,13 +35,14 @@
 
   <simpara>
    <type>Integer</type>s can be specified in decimal (base 10), hexadecimal
-   (base 16), or octal (base 8) notation, optionally preceded by a sign
-   (- or +).
+   (base 16), octal (base 8), or binary (base 2) notation, optionally preceded
+   by a sign (- or +).
   </simpara>
 
   <para>
    To use octal notation, precede the number with a <literal>0</literal> (zero).
    To use hexadecimal notation precede the number with <literal>0x</literal>.
+   To use binary notation, precede the number with <literal>0b</literal>.
   </para>
 
   <example>
@@ -53,6 +54,7 @@
 $a = -123; // a negative number
 $a = 0123; // octal number (equivalent to 83 decimal)
 $a = 0x1A; // hexadecimal number (equivalent to 26 decimal)
+$a = 0b11010; // binary number (equivalent to 26 decimal)
 ?>
 ]]>
    </programlisting>
@@ -72,6 +74,8 @@
 
 octal       : 0[0-7]+
 
+binary      : 0[bB][01]+
+
 integer     : [+-]?decimal
             | [+-]?hexadecimal
             | [+-]?octal
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Sat Apr 19 22:02:16 2014 UTC