3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function gray_encode() { for($j=1; $j<32; $j++) { echo '<h1>' .$j , "</h1><br/>"; $powered = number_format( pow(2, $j) -1 , 0, '.', ''); $lineNumber = 1; for ($i = number_format( ( $powered - $j)+1, 0, '.', ''); $i < number_format( ($powered+1), 0, '.', ''); $i++) { echo '<strong>' .$lineNumber . '</strong>. '; $decbin = decbin($i ^ ($i >> 1)); echo '-----'.bindec($decbin) . '----- '; echo $decbin ."<br/>"; $lineNumber++; } echo '<hr>'; } } //fscanf(STDIN, "%d\n", $number); gray_encode();

Abusive script

This script was stopped while abusing our resources