I AM TRYING TO ASSIGN A VARIABLE THE VALUE OF 0123, BUT IT KEEPS COMING UP WITH A DIFFERENT NUMBER, WHAT’S THE PROBLEM?

Awadhendra Tiwari

Total Post:510

Points:2550
Posted by  Awadhendra Tiwari
PHP 
PHP
 1243  View(s)
Ratings:
Rate this:
  1. Awadhendra Tiwari

    Post:510

    Points:2550
    I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what’s the problem?

    PHP Interpreter treats numbers beginning with 0 as octal. Thats why you will get different output.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!