What does the following code output?

Technology CommunityCategory: PHPWhat does the following code output?
VietMX Staff asked 4 years ago
Problem

Consider:

$i = 016;
echo $i / 2;

What will be the output?

The Output should be 7. The leading zero indicates an _octal number _in PHP, so the number evaluates to the decimal number 14 instead to decimal 16.