3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php header("Content-type: image/jpeg"); $imgPath = 'http://i.imgur.com/yS5hPLa.jpg'; $image = imagecreatefromjpeg($imgPath); $color = imagecolorallocate($image, 255, 255, 255); $string = "meow"; $fontSize = 3; $x = 115; $y = 185; imagestring($image, $fontSize, $x, $y, $string, $color); imagejpeg($image); ?>
Output for 7.0.0 - 7.3.0rc4
Fatal error: Uncaught Error: Call to undefined function imagecreatefromjpeg() in /in/v6SgB:4 Stack trace: #0 {main} thrown in /in/v6SgB on line 4
Process exited with code 255.
Output for hhvm-3.22.0
Warning: Failed to open http://i.imgur.com/yS5hPLa.jpg (Could not resolve host: i.imgur.com) in /in/v6SgB on line -1 Warning: failed to open stream: http://i.imgur.com/yS5hPLa.jpg in /in/v6SgB on line -1 Warning: imagecolorallocate() expects parameter 1 to be resource, boolean given in /in/v6SgB on line -1 Warning: imagestring() expects parameter 1 to be resource, boolean given in /in/v6SgB on line -1 Warning: imagejpeg() expects parameter 1 to be resource, boolean given in /in/v6SgB on line -1
Output for hhvm-3.15.4 - 3.21.3
Warning: Failed to open http://i.imgur.com/yS5hPLa.jpg (Could not resolve host: i.imgur.com) in /in/v6SgB on line 4 Warning: failed to open stream: http://i.imgur.com/yS5hPLa.jpg in /in/v6SgB on line 4 Warning: imagecolorallocate() expects parameter 1 to be resource, boolean given in /in/v6SgB on line 5 Warning: imagestring() expects parameter 1 to be resource, boolean given in /in/v6SgB on line 10 Warning: imagejpeg() expects parameter 1 to be resource, boolean given in /in/v6SgB on line 11
Output for hhvm-3.12.14 - 3.13.2
Warning: Failed to open http://i.imgur.com/yS5hPLa.jpg (Could not resolve host: i.imgur.com) in /in/v6SgB on line 4 Warning: failed to open stream: http://i.imgur.com/yS5hPLa.jpg in /in/v6SgB on line 4 Warning: supplied resource is not a valid Image resource in /in/v6SgB on line 5 Warning: supplied resource is not a valid Image resource in /in/v6SgB on line 10 Warning: supplied resource is not a valid Image resource in /in/v6SgB on line 11
Output for hhvm-3.10.1 - 3.11.1
Warning: Failed to open http://i.imgur.com/yS5hPLa.jpg (Could not resolve host: i.imgur.com) in /in/v6SgB on line 4 Warning: failed to open stream: http://i.imgur.com/yS5hPLa.jpg in /in/v6SgB on line 4
Output for 5.3.0 - 5.6.38
Fatal error: Call to undefined function imagecreatefromjpeg() in /in/v6SgB on line 4
Process exited with code 255.