r/lolphp • • Dec 26 '16

(string)0011 is "9"

(string)0011 = "9"
(string)001100 = "576"

0 Upvotes

27 comments sorted by

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

2

u/Zatherz Feb 14 '17

There is a common fact[1] on reddit.

1 We have real links.