Sadat Sadat - 5 months ago 15
PHP Question

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.

Answer

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

Comments