Basic PHP Programming Question:

I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what is the problem?

Tweet Share WhatsApp

Answer:

PHP Interpreter treats numbers beginning with 0 as octal. Look at the similar PHP interview questions for more numeric problems.

Download PHP PDF Read All 139 PHP Questions
Previous QuestionNext Question
How can I execute a PHP script using command line?Would I use print "$a dollars" or "{$a} dollars" to print out the amount of dollars in this example?