kozo0a
Last Updated: February 25, 2016
·
1.017K
· runexec
81609937c20aeab3598aea56f1f4f022

PHP Number Hell

Any number beginning with 0 and doesn't contain an integer value greater than 7 will be automatically assumed and interpreted as an octal value.
endorse

[RyanKelker tmp]$ cat test.php     
<?php    
# could cause bugs if you're not aware.    

function test () {    
 return ( 123 == 0123 )?1:0;    
}    

if (!test()) { echo 0123; echo "\r\n"; }    
?>     
[RyanKelker tmp]$ php test.php     
83    
Say Thanks
Respond