3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Report any errors ini_set ("display_errors", "1"); error_reporting(E_ALL); //Set the correct content type header('content-type: image/png'); //Create our basic image stream //125px width, 125px height $image = imagecreate(125, 125); //Set the background color $blue = imagecolorallocate($image, 0, 0, 255); //Set up another color just to show how the first color declared is used as the background color when we use imagecreate() //Notice how blue is applied to the background, *not* red. $red = imagecolorallocate($image, 255, 0, 0); //save the image as a png and output imagepng($image); //Clear up memory used imagedestroy($image);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function imagecreate() in /in/CVuY0:11 Stack trace: #0 {main} thrown in /in/CVuY0 on line 11
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
41.1 ms | 401 KiB | 8 Q