rfc:binnotation4ints
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
rfc:binnotation4ints [2010/11/11 22:24] – created jharris | rfc:binnotation4ints [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
* Date: 2010-11-11 | * Date: 2010-11-11 | ||
* Author: Jonah H. Harris < | * Author: Jonah H. Harris < | ||
- | * Status: | + | * Status: |
===== Introduction ===== | ===== Introduction ===== | ||
Line 11: | Line 11: | ||
===== History ===== | ===== History ===== | ||
- | As most developers know, PHP already supports octal and hexadecimal as alternatives to standard decimal notation. | + | As most developers know, PHP already supports octal and hexadecimal as alternatives to standard decimal notation. |
+ | |||
+ | An example of using hexadecimal notation is for bitmasks, where flag values are commonly defined using hexadecimal notation (0x01, 0x02, 0x04, 0x08, 0x10, etc.) While this works, it isn't visually representative of the bitmask which, in addition to being just plain cool, is one of the reasons several of the newer languages have incorporated binary notation support--support that allows developers to specify the value 2010 as 0b11111011010 or flags as 0b00001, 0b00010, 0b00100, 0b01000, 0b10000. | ||
===== Proposal ===== | ===== Proposal ===== | ||
Given that binary notation is syntactic sugar, the proposed implementation appears to be relatively minor. | Given that binary notation is syntactic sugar, the proposed implementation appears to be relatively minor. | ||
+ | |||
+ | * Scanner Changes--First, | ||
+ | |||
+ | * Custom string-to-double Functions--Add another strtod function, zend_bin_strtod, | ||
===== Patch ===== | ===== Patch ===== | ||
Line 21: | Line 27: | ||
Preliminary source and documentation patches can be found with the ticket [[http:// | Preliminary source and documentation patches can be found with the ticket [[http:// | ||
- | ===== Changelog | + | ===== References |
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | ===== Changelog ===== | ||
+ | implemented with http:// |
rfc/binnotation4ints.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1