This question already has an answer here:
Let us assume In PHP
$i = 016;
echo $i / 2;
The output is returning 7
.! why..?
</div>
Appending 0 to the front of a number in PHP is making it octal.
16 in octal is equivalent to 14 in decimal.
So , 14/2 = 7 is the answer.
The leading 0
will cause 016
to be interpreted as written in base 8
, thus in base 10
it will actually be 14
. So 14/2 = 7