Numbers prefixed with 0 are treated as octal numbers:
$x = 012;//$x is 10
The reason that $x = '012';
works is because PHP converts that to an integer without treating it as an octal number.
0
solved Number with 0 on the front? [closed]
Numbers prefixed with 0 are treated as octal numbers:
$x = 012;//$x is 10
The reason that $x = '012';
works is because PHP converts that to an integer without treating it as an octal number.
0
solved Number with 0 on the front? [closed]