php - What is special about 008 for type juggling to fail? -


what special string '008' , higher cause type juggling (for lack of better word) fail? numbered strings below 008 work fine, 008 or higher not appear ever equal number?

to more precise, seems comparison 007, 008 , 009 issue lies, php not count 008 integer?

$mystring='007'; //works fine. $mystring='008'; //fails. $mystring='009'; //fails.  if($mystring==007) return 'abc'; if($mystring==008) return 'def'; if($mystring==009) return 'ghi'; 

starting number leading 0 indicates octal (base 8). digits 0-7 valid octal.

http://php.net/manual/en/language.types.integer.php


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -