3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function IsOcta($string){ (int) $x=octdec("$string"); // Input must be a String and octdec returns NUMBER $y=decoct($x); // Must be a Number and decoct returns STRING if($string==$y){ return true; }else{ return false; } } $octal = 010; var_dump(IsOcta($octal));
based on iCQH0
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0alpha1
bool(false)