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.
Comments
Post a Comment