PHP manual says Integers can be specified in decimal (base 10), hexadecimal (base 16), octal (base 8) or binary (base 2) notation, optionally preceded by a sign (- or +).
means integer can be decimal, hexadecimal , octal and binary.
so simple if i have echo 014; it first converting into base 10 and output give 12.
Why it converting automatically to base 10 , but on the other hand manual say that integer can be specified in octal also.
also look a example of type casting var_dump((int) 014) it outputs int 12.also this time it converting to base 10, but manual say octal is itself also a integer.
The problem is with manual language. it should say that type casting to integer means (int) is decimal integer conversion instead of saying that it would convert it into integer. there is difference between integer and decimal integer .