3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $image = imagecreatetruecolor(100, 100); // Transparent Background imagealphablending($image, false); $transparency = imagecolorallocatealpha($image, 0, 0, 0, 127); imagefill($image, 0, 0, $transparency); imagesavealpha($image, true); // Drawing over $black = imagecolorallocate($image, 0, 0, 0); imagefilledrectangle($image, 25, 25, 75, 75, $black); header('Content-Type: image/png'); imagepng($image);
based on 6eNpN
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function imagecreatetruecolor() in /in/ShK0f:2 Stack trace: #0 {main} thrown in /in/ShK0f on line 2
Process exited with code 255.
Output for 5.3.18 - 5.6.28
Fatal error: Call to undefined function imagecreatetruecolor() in /in/ShK0f on line 2
Process exited with code 255.