Question:

What does the following code output?

$i = 016;
echo $i / 2;

Answer:

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.


Keywords:

© 2017 QuizBucket.org