3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php header("Content-type: image/png"); $string = $_GET['text']; $im = imagecreatefrompng("images/button1.png"); $orange = imagecolorallocate($im, 220, 210, 60); $px = (imagesx($im) - 7.5 * strlen($string)) / 2; imagestring($im, 3, $px, 9, $string, $orange); imagepng($im); imagedestroy($im); ?>
Output for 7.0.0 - 7.1.0
Notice: Undefined index: text in /in/YBHbO on line 3 Fatal error: Uncaught Error: Call to undefined function imagecreatefrompng() in /in/YBHbO:4 Stack trace: #0 {main} thrown in /in/YBHbO on line 4
Process exited with code 255.
Output for hhvm-3.12.0
Notice: Undefined index: text in /in/YBHbO on line 3 Warning: No such file or directory in /in/YBHbO on line 4 Warning: failed to open stream: images/button1.png in /in/YBHbO on line 4 Warning: supplied resource is not a valid Image resource in /in/YBHbO on line 5 Warning: supplied resource is not a valid Image resource in /in/YBHbO on line 6 Warning: imagestring() expects parameter 5 to be string, null given in /in/YBHbO on line 7 Warning: supplied resource is not a valid Image resource in /in/YBHbO on line 8
Output for hhvm-3.10.0
Notice: Undefined index: text in /in/YBHbO on line 3 Warning: No such file or directory in /in/YBHbO on line 4 Warning: failed to open stream: images/button1.png in /in/YBHbO on line 4
Output for 5.3.0 - 5.6.28
Notice: Undefined index: text in /in/YBHbO on line 3 Fatal error: Call to undefined function imagecreatefrompng() in /in/YBHbO on line 4
Process exited with code 255.
Output for 5.0.0 - 5.2.17
Notice: Undefined index: text in /in/YBHbO on line 3 Fatal error: Call to undefined function imagecreatefrompng() in /in/YBHbO on line 4
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Notice: Undefined index: text in /in/YBHbO on line 3 Fatal error: Call to undefined function: imagecreatefrompng() in /in/YBHbO on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Notice: Undefined index: text in /in/YBHbO on line 3 Fatal error: Call to undefined function: imagecreatefrompng() in /in/YBHbO on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Undefined index: text in /in/YBHbO on line 3 Fatal error: Call to undefined function: imagecreatefrompng() in /in/YBHbO on line 4