PHP Community Marketing Expert Question:

Download Job Interview Questions and Answers PDF

Tell me what does the following code output?

$i = 016;
echo $i / 2;?

PHP Community Marketing Expert Interview Question
PHP Community Marketing Expert Interview Question

Answers:

Answer #1
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.

Answer #2
output will be 7

Download PHP Community Marketing Expert Interview Questions And Answers PDF

Previous QuestionNext Question
Explain me what are the 3 scope levels available in PHP and how would you define them?Tell me what library is used for pdf in PHP?