rfc:explicit_octal_notation
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
rfc:explicit_octal_notation [2020/10/21 14:59] – Change status girgias | rfc:explicit_octal_notation [2020/11/07 08:33] – Add explicit mention of upper case notation. girgias | ||
---|---|---|---|
Line 12: | Line 12: | ||
This convention for octal integers is well established and followed by many programming languages (Java, C, C#, Golang, Haskell, and more). However, Python, JavaScript, and Rust [[https:// | This convention for octal integers is well established and followed by many programming languages (Java, C, C#, Golang, Haskell, and more). However, Python, JavaScript, and Rust [[https:// | ||
- | Surprisingly PHP already has support for this notation | + | Surprisingly PHP already has support for this notation when using the < |
===== Proposal ===== | ===== Proposal ===== | ||
- | Add support for the explicit octal notation '' | + | Add support for the explicit octal notation '' |
<code php> | <code php> | ||
0o16 === 14; // true | 0o16 === 14; // true | ||
0o123 === 83; // true | 0o123 === 83; // true | ||
+ | |||
+ | 0O16 === 14; // true | ||
+ | 0O123 === 83; // true | ||
016 === 0o16; // true | 016 === 0o16; // true | ||
+ | 016 === 0O16; // true | ||
</ | </ | ||
rfc/explicit_octal_notation.txt · Last modified: 2021/01/04 20:12 by girgias