3v4l.org

run code in 300+ PHP versions simultaneously
<?php header("Content-type: image/png"); $sizex=800; $sizey=800; $img = imagecreatetruecolor(3 * $sizex,$sizey); $r = imagecolorallocate($img,255, 0, 0); $g = imagecolorallocate($img,0, 255, 0); $b = imagecolorallocate($img,0, 0, 255); imagefilledrectangle($img, 0, 0, 3 * $sizex, $sizey, imagecolorallocate($img, 255, 255, 255)); $p = 0; for($i=0; $i < 100000; $i++) { $np = rand(0,$sizex); imagesetpixel($img, $p, $np, $r); $p = $np; } $p = 0; for($i=0; $i < 100000; $i++) { $np = mt_rand(0,$sizex); imagesetpixel($img, $p + $sizex, $np, $g); $p = $np; } $p = 0; for($i=0; $i < 100000; $i++) { $np = floor($sizex*(hexdec(bin2hex(openssl_random_pseudo_bytes(4)))/0xffffffff)); imagesetpixel($img, $p + (2*$sizex), $np, $b); $p = $np; } imagepng($img); imagedestroy($img); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function imagecreatetruecolor() in /in/Nd8PU:6 Stack trace: #0 {main} thrown in /in/Nd8PU on line 6
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:
53.61 ms | 401 KiB | 8 Q