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; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/P2aEe
function name:  (null)
number of ops:  12
compiled vars:  !0 = $image_type, !1 = $mime
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL_BY_NAME                                       'exif_imagetype'
          1        SEND_VAL_EX                                              'image.gif'
          2        DO_FCALL                                      0  $2      
          3        ASSIGN                                                   !0, $2
    6     4        IS_EQUAL                                                 !0, 1
          5      > JMPZ                                                     ~4, ->11
    7     6    >   INIT_FCALL                                               'image_type_to_mime_type'
          7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !1, $5
    8     9        CONCAT                                           ~7      'The+picture+is+a+gif%2C+with+a+mime+type+of+', !1
         10        ECHO                                                     ~7
    9    11    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.22 ms | 1394 KiB | 15 Q