3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $image = imagecreatefrompng("http://i.imgur.com/h1dnVN8.png"); $colorBlack = imagecolorallocate($image, 0, 0, 0); imagettftext($image, 10, 0, 20, 20, $colorBlack, "John Smith"); imagepng($image); imagedestroy($image);
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function imagecreatefrompng() in /in/0OXJl:3 Stack trace: #0 {main} thrown in /in/0OXJl on line 3
Process exited with code 255.
Output for hhvm-3.12.0
Warning: Failed to open http://i.imgur.com/h1dnVN8.png (Could not resolve host: i.imgur.com) in /in/0OXJl on line 3 Warning: failed to open stream: http://i.imgur.com/h1dnVN8.png in /in/0OXJl on line 3 Warning: supplied resource is not a valid Image resource in /in/0OXJl on line 5 Warning: imagettftext() expects exactly 8 parameters, 7 given in /in/0OXJl on line 6 Warning: supplied resource is not a valid Image resource in /in/0OXJl on line 8
Output for hhvm-3.10.0
Warning: Failed to open http://i.imgur.com/h1dnVN8.png (Could not resolve host: i.imgur.com) in /in/0OXJl on line 3 Warning: failed to open stream: http://i.imgur.com/h1dnVN8.png in /in/0OXJl on line 3 Warning: imagettftext() expects exactly 8 parameters, 7 given in /in/0OXJl on line 6
Output for 5.0.0 - 5.6.28
Fatal error: Call to undefined function imagecreatefrompng() in /in/0OXJl on line 3
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: imagecreatefrompng() in /in/0OXJl on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: imagecreatefrompng() in /in/0OXJl on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: imagecreatefrompng() in /in/0OXJl on line 3