Basic PHP Programming Question:

Download Job Interview Questions and Answers PDF

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

PHP Interview Question
PHP Interview Question

Answer:

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

Download PHP Interview Questions And Answers PDF

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?