3v4l.org

run code in 300+ PHP versions simultaneously
<?php header("content-type:image/png"); $im = imagecreate(100, 100); $a = sprintf('%04x',mt_rand(0, 65535)); $b = sprintf('%04x',mt_rand(0, 65535)); $c = sprintf('%04x',mt_rand(0, 65535)); $white = imagecolorallocate($im,$a,$b,$c); imagepng($im); imagedestroy($im); echo "\n\n\n$a-$b-$c";
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.24, 7.3.0 - 7.3.12
Fatal error: Uncaught Error: Call to undefined function imagecreate() in /in/1lghI:3 Stack trace: #0 {main} thrown in /in/1lghI on line 3
Process exited with code 255.
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28
Fatal error: Call to undefined function imagecreate() in /in/1lghI on line 3
Process exited with code 255.

preferences:
94.82 ms | 401 KiB | 91 Q