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); ?>
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.10, 7.2.0 - 7.2.33, 7.3.12 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6

Process exited with code 255.
Output for 4.3.0 - 4.3.1

preferences:
231.82 ms | 401 KiB | 313 Q