0
I have the following code:
$value = 040;
echo $value / 2;
Exit:
16
The variable $valueand receives 040 instead of simply 40. However, in some languages, perhaps most, the 0 would be disregarded, in PHP no.
What would be the logic behind this operation?
The zero represents "octal"
– Guilherme Nascimento
Related: What are Decimal, Hexadecimal and Octal notation numbers?
– rray