3v4l.org

run code in 300+ PHP versions simultaneously
<?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 echo "<br />IsOcta() - Octal Number Reconverted: ".$y; if($string==$y){ echo "<br /> Result: OCTAL"; }else{ echo "<br /> Result: NOT OCTAL"; } } $octal = 010; var_dump(IsOcta($octal));
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /in/iCQH0 on line 4 <br />IsOcta() - Octal Number Reconverted: 0<br /> Result: NOT OCTALNULL

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
54.4 ms | 401 KiB | 8 Q