3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $imgSrc = "http://xn----ctbcj7ba1aej0f.xn--p1ai/images/top-back.png"; if (exif_imagetype($imgSrc) == IMAGETYPE_GIF) { $filetype = 'The picture is GIF'; } if (exif_imagetype($imgSrc) == IMAGETYPE_JPEG) { $filetype = 'The picture is JPEG'; } if (exif_imagetype($imgSrc) == IMAGETYPE_PNG) { $filetype = 'The picture is PNG'; } echo $filetype;
based on a6CQj
Output for 7.0.0 - 7.3.0beta1
Fatal error: Uncaught Error: Call to undefined function exif_imagetype() in /in/WAISp:5 Stack trace: #0 {main} thrown in /in/WAISp on line 5
Process exited with code 255.
Output for hhvm-3.15.4
Warning: Failed to open http://xn----ctbcj7ba1aej0f.xn--p1ai/images/top-back.png (Could not resolve host: xn----ctbcj7ba1aej0f.xn--p1ai) in /in/WAISp on line 5 Warning: Failed to open http://xn----ctbcj7ba1aej0f.xn--p1ai/images/top-back.png (Could not resolve host: xn----ctbcj7ba1aej0f.xn--p1ai) in /in/WAISp on line 8 Warning: Failed to open http://xn----ctbcj7ba1aej0f.xn--p1ai/images/top-back.png (Could not resolve host: xn----ctbcj7ba1aej0f.xn--p1ai) in /in/WAISp on line 11 Notice: Undefined variable: filetype in /in/WAISp on line 14
Output for 5.6.0 - 5.6.30
Fatal error: Call to undefined function exif_imagetype() in /in/WAISp on line 5
Process exited with code 255.