Possible Duplicate:
Interview question: In php, is 123==0123?
I am newbie in PHP. I am trying to store 0123 in a PHP variable while learning PHP but it displays 83 instead of 0123 when I echo the variable. Can anyone give me exact technical reason of that.
Thanks in Advance,
Dhaval
You are probably doing something like this
This is an integer and not a string. Sidenote: “0123” is not a number, because no number has a leading
0exceptabs($var)<1or$var == 0. But the leading0has a special meaning when used with integers: It is treated as a base-8-integer, which is then converted into base-10