3v4l.org

run code in 300+ PHP versions simultaneously
<?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; }

preferences:
36.7 ms | 402 KiB | 5 Q