3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // if file is a GIF line below should return IMAGETYPE_GIF $image_type = exif_imagetype('image.gif'); if ($image_type == IMAGETYPE_GIF) { $mime = image_type_to_mime_type(); // will produce "image/gif" as String. echo 'The picture is a gif, with a mime type of ' . $mime; }
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function exif_imagetype() in /in/P2aEe:4 Stack trace: #0 {main} thrown in /in/P2aEe on line 4
Process exited with code 255.
Output for 5.4.34 - 5.6.28
Fatal error: Call to undefined function exif_imagetype() in /in/P2aEe on line 4
Process exited with code 255.
Output for 4.3.2 - 5.4.32
Warning: exif_imagetype(image.gif): failed to open stream: No such file or directory in /in/P2aEe on line 4
Output for 4.3.0 - 4.3.1
Warning: exif_imagetype(image.gif) [http://www.php.net/function.exif-imagetype]: failed to create stream: No such file or directory in /in/P2aEe on line 4