Skip to content
Advertisement

Interview question: In php, is 123==0123?

I have answered it is false. then he asked why? i couldn’t answer. Can anyone make the answer? I am very interested to learn it.

Advertisement

Answer

Prefixing a number with 0 indicates octal (base 8), much the same way 0x indicates hex (base 16).

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement