3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(0); include ('../function.php'); $x = htmlspecialchars($_GET['x']); $y = htmlspecialchars($_GET['y']); $z = htmlspecialchars($_GET['z']); $q = htmlspecialchars($_GET['q']); // function rekurze($q, $x) { $q = str_replace("x", '('.$x.')', $q); $qa = str_replace("x", '('. ($x+0.05) .')', $zadani); if (is_numeric($q)) { return $q; } else { eval('$result = (string)('.$q.')*1;'); eval('$resulta = (string)('.$qa.');'); if (($result-$resulta) >= 500 || $result == $resulta) { return 'NAN'; } else { return $result; } } } // $obr = imagecreatetruecolor(128, 128); imageantialias($obr, true); $bila = ImageColorAllocate ($obr, 255, 255, 255); $cerna = ImageColorAllocate ($obr, 0, 0, 0); $cervena = ImageColorAllocate ($obr, 244, 55, 55); $modra = ImageColorAllocate ($obr, 31, 58, 147); $lajna = ImageColorAllocate ($obr, 214, 195, 179); imagefill($obr, 0, 0, $bila); // if ($x%2 && $y%2) { imagestring($obr, 1, 50, 54, 'VIKITRON', $lajna); } // if (!$x) { // horizontalni ImageLine ($obr, 0, 0, 0, 128, $cerna); } if (!$y) { // vertikalni ImageLine ($obr, 0, 127, 128, 127, $cerna); ImageLine ($obr, 0, 123, 0, 128, $cerna); ImageLine ($obr, 64, 123, 64, 128, $cerna); imagestring($obr, 2, 3, 115, $x*2, $cerna); imagestring($obr, 2, 67, 115, $x*2+1, $cerna); } for ($i=0;$i<130;$i++) { $result = 0-(rekurze($q, $y+($i*0.0078)))*128+(($x+1)*128); if ($result != 'NAN') { ImageLine ($obr, $i-1, $predchozi, $i, $result, $modra); $predchozi = $result; } else { ImageLine ($obr, $i-1, 0, $i, 128, $cervena); } } // imagestring($obr, 2, 5, 0, '['.$x.'; '.$y.']', $lajna); // header('Content-type: image/png'); imagepng($obr); imagedestroy($obr); ?>

preferences:
101.6 ms | 402 KiB | 5 Q