3v4l.org

run code in 300+ PHP versions simultaneously
<? ini_set('display_errors', 'On'); error_reporting(E_ALL); // determine image format print "1\n"; if (exif_imagetype('http://23mox.com/php/GoogleMapAPI/IMG_0266_mod.JPEG') == IMAGETYPE_JPEG) { print "Hey, this is a JPEG image"; } print "2"; // extra thumbnail from EXIF data, this sometimes help and you // do not need to generate your own thumbnails, most digital // cameras provide a thumbnail $thumb_image = exif_thumbnail($original_file, $width, $height, $type); print "Height: $height \nWidth: $width \nType: $type"; // save thumbnail to a file file_put_contents($path_to_thumb_image,$thumb_image); // read all available tags into an associative array $exif_data = exif_read_data($original_file, 'ANY_TAG'); foreach ($exif_data as $key => $section_data) { foreach ($section_data as $name => $val) { print "$key.$name : $val \n"; } } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 14
Branch analysis from position: 13
2 jumps found. (Code = 77) Position 1 = 39, Position 2 = 54
Branch analysis from position: 39
2 jumps found. (Code = 78) Position 1 = 40, Position 2 = 54
Branch analysis from position: 40
2 jumps found. (Code = 77) Position 1 = 42, Position 2 = 52
Branch analysis from position: 42
2 jumps found. (Code = 78) Position 1 = 43, Position 2 = 52
Branch analysis from position: 43
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
Branch analysis from position: 52
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
Branch analysis from position: 52
Branch analysis from position: 54
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 54
Branch analysis from position: 14
filename:       /in/k2jni
function name:  (null)
number of ops:  56
compiled vars:  !0 = $thumb_image, !1 = $original_file, !2 = $width, !3 = $height, !4 = $type, !5 = $path_to_thumb_image, !6 = $exif_data, !7 = $section_data, !8 = $key, !9 = $val, !10 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'ini_set'
          1        SEND_VAL                                                 'display_errors'
          2        SEND_VAL                                                 'On'
          3        DO_ICALL                                                 
    3     4        INIT_FCALL                                               'error_reporting'
          5        SEND_VAL                                                 32767
          6        DO_ICALL                                                 
    5     7        ECHO                                                     '1%0A'
    8     8        INIT_FCALL_BY_NAME                                       'exif_imagetype'
          9        SEND_VAL_EX                                              'http%3A%2F%2F23mox.com%2Fphp%2FGoogleMapAPI%2FIMG_0266_mod.JPEG'
         10        DO_FCALL                                      0  $13     
         11        IS_EQUAL                                                 $13, 2
         12      > JMPZ                                                     ~14, ->14
    9    13    >   ECHO                                                     'Hey%2C+this+is+a+JPEG+image'
   12    14    >   ECHO                                                     '2'
   17    15        INIT_FCALL_BY_NAME                                       'exif_thumbnail'
         16        SEND_VAR_EX                                              !1
         17        SEND_VAR_EX                                              !2
         18        SEND_VAR_EX                                              !3
         19        SEND_VAR_EX                                              !4
         20        DO_FCALL                                      0  $15     
         21        ASSIGN                                                   !0, $15
   19    22        ROPE_INIT                                     6  ~18     'Height%3A+'
         23        ROPE_ADD                                      1  ~18     ~18, !3
         24        ROPE_ADD                                      2  ~18     ~18, '+%0AWidth%3A+'
         25        ROPE_ADD                                      3  ~18     ~18, !2
         26        ROPE_ADD                                      4  ~18     ~18, '+%0AType%3A+'
         27        ROPE_END                                      5  ~17     ~18, !4
         28        ECHO                                                     ~17
   22    29        INIT_FCALL                                               'file_put_contents'
         30        SEND_VAR                                                 !5
         31        SEND_VAR                                                 !0
         32        DO_ICALL                                                 
   25    33        INIT_FCALL_BY_NAME                                       'exif_read_data'
         34        SEND_VAR_EX                                              !1
         35        SEND_VAL_EX                                              'ANY_TAG'
         36        DO_FCALL                                      0  $22     
         37        ASSIGN                                                   !6, $22
   27    38      > FE_RESET_R                                       $24     !6, ->54
         39    > > FE_FETCH_R                                       ~25     $24, !7, ->54
         40    >   ASSIGN                                                   !8, ~25
   28    41      > FE_RESET_R                                       $27     !7, ->52
         42    > > FE_FETCH_R                                       ~28     $27, !9, ->52
         43    >   ASSIGN                                                   !10, ~28
   29    44        ROPE_INIT                                     6  ~31     !8
         45        ROPE_ADD                                      1  ~31     ~31, '.'
         46        ROPE_ADD                                      2  ~31     ~31, !10
         47        ROPE_ADD                                      3  ~31     ~31, '+%3A+'
         48        ROPE_ADD                                      4  ~31     ~31, !9
         49        ROPE_END                                      5  ~30     ~31, '+%0A'
         50        ECHO                                                     ~30
   28    51      > JMP                                                      ->42
         52    >   FE_FREE                                                  $27
   27    53      > JMP                                                      ->39
         54    >   FE_FREE                                                  $24
   32    55      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.54 ms | 1400 KiB | 19 Q