3v4l.org

run code in 300+ PHP versions simultaneously
<?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;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 19
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
Branch analysis from position: 13
Branch analysis from position: 7
filename:       /in/WAISp
function name:  (null)
number of ops:  21
compiled vars:  !0 = $imgSrc, !1 = $filetype
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fxn----ctbcj7ba1aej0f.xn--p1ai%2Fimages%2Ftop-back.png'
    5     1        INIT_FCALL_BY_NAME                                       'exif_imagetype'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $3      
          4        IS_EQUAL                                                 $3, 1
          5      > JMPZ                                                     ~4, ->7
    6     6    >   ASSIGN                                                   !1, 'The+picture+is+GIF'
    8     7    >   INIT_FCALL_BY_NAME                                       'exif_imagetype'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0  $6      
         10        IS_EQUAL                                                 $6, 2
         11      > JMPZ                                                     ~7, ->13
    9    12    >   ASSIGN                                                   !1, 'The+picture+is+JPEG'
   11    13    >   INIT_FCALL_BY_NAME                                       'exif_imagetype'
         14        SEND_VAR_EX                                              !0
         15        DO_FCALL                                      0  $9      
         16        IS_EQUAL                                                 $9, 3
         17      > JMPZ                                                     ~10, ->19
   12    18    >   ASSIGN                                                   !1, 'The+picture+is+PNG'
   14    19    >   ECHO                                                     !1
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.46 ms | 1394 KiB | 13 Q