What is the output of the following code snippet?$a = 0123; echo $a;

PHP Intermediate Hard

PHP Intermediate — Hard

What is the output of the following code snippet?$a = 0123; echo $a;

Key points

  • Leading zeros trigger octal interpretation
  • Octal digits are restricted to 0-7
  • Integer literals are base-10 by default

Ready to go further?

Related questions