3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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 - 5.6.28, 7.0.0 - 7.1.0

Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
�PNG  IHDR��L\���IDATx����i�@@�Qp3�CJH�.�=��@Il���2�9_�Af4�/c�u]��z����W��y���q������S��ݲgࠣ#�z9��Wp���{&��xb΀���������9�8�W�rv�ȡ��C8&@L��1b��  &@L��1b��  &@L��1b��  &@L��1b��  &@L��1b��  &@L��1b��  &@L��1b��  &@L��1b��  &@L��1b��  &@L��1b��  &@L��1b��  &@L��1b��  &@L��1b��  v`Y�d��t�`Y�u]�{�݌+� ��c�����s΀w����>�������t�N����`���_��b��8�|�e��]9����J�Y�IEND�B`�
Output for 4.3.0 - 4.3.1