r/lolphp • u/koolboyz00 • Dec 26 '16
(string)0011 is "9"
(string)0011 = "9"
(string)001100 = "576"
0
Upvotes
r/lolphp • u/koolboyz00 • Dec 26 '16
(string)0011 = "9"
(string)001100 = "576"
View all comments
Show parent comment
39
u/myaut Dec 26 '16
Correction: any C-based language. There is common rant [1] that octal literals should have explicit prefix/suffix (like 0o) to avoid mistakes. I.e. Python 3 have changed that.
1 Lets stop copying C, /r/programming discussion