Location: PHPKode > projects > phc > test/subjects/codegen/bench_mandel2.php
<?

function mandel2() {
  $b = " .:,;!/>)|&IH%*#";
  //float r, i, z, Z, t, c, C;
  for ($y=30; printf("\n"), $C = $y*0.1 - 1.5, $y--;){
    for ($x=0; $c = $x*0.04 - 2, $z=0, $Z=0, $x++ < 7;){
      for ($r=$c, $i=$C, $k=0; $t = $z*$z - $Z*$Z + $r, $Z = 2*$z*$Z + $i, $z=$t, $k<50; $k++)
        if ($z*$z + $Z*$Z > 50) break;
      echo $b[$k%16];
    }
  }
}

mandel2 ();

?>
Return current item: phc