3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Image { public $height; public $width; public $htmlAttribute; } $filename = "http://img.wikinut.com/img/gycf69_-6rv_5fol/jpeg/0/Best-Friends-Img-Src%3AImage%3A-FreeDigitalPhotos.net.jpeg"; $imgSize = getimagesize($filename) or die('Sorry, File Not Found'); if ($imgSize != "") { $img = new Image(); $img->height = $imgSize[0]; $img->width = $imgSize[1]; $img->htmlAttribute = $imgSize[3]; $counter = 0; foreach ($imgSize as $imgProp) { echo $counter.":".PHP_EOL.$imgProp .PHP_EOL; $counter += 1; } echo '<img src="'.$filename.'" />'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 36
Branch analysis from position: 10
2 jumps found. (Code = 77) Position 1 = 24, Position 2 = 32
Branch analysis from position: 24
2 jumps found. (Code = 78) Position 1 = 25, Position 2 = 32
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
Branch analysis from position: 36
filename:       /in/Y0KWe
function name:  (null)
number of ops:  37
compiled vars:  !0 = $filename, !1 = $imgSize, !2 = $img, !3 = $counter, !4 = $imgProp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fimg.wikinut.com%2Fimg%2Fgycf69_-6rv_5fol%2Fjpeg%2F0%2FBest-Friends-Img-Src%253AImage%253A-FreeDigitalPhotos.net.jpeg'
   13     1        INIT_FCALL                                               'getimagesize'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $6      
          4        ASSIGN                                           ~7      !1, $6
          5      > JMPNZ_EX                                         ~7      ~7, ->8
          6    > > EXIT                                                     'Sorry%2C+File+Not+Found'
          7*       BOOL                                             ~7      <true>
   15     8    >   IS_NOT_EQUAL                                             !1, ''
          9      > JMPZ                                                     ~8, ->36
   17    10    >   NEW                                              $9      'Image'
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !2, $9
   19    13        FETCH_DIM_R                                      ~13     !1, 0
         14        ASSIGN_OBJ                                               !2, 'height'
         15        OP_DATA                                                  ~13
   20    16        FETCH_DIM_R                                      ~15     !1, 1
         17        ASSIGN_OBJ                                               !2, 'width'
         18        OP_DATA                                                  ~15
   21    19        FETCH_DIM_R                                      ~17     !1, 3
         20        ASSIGN_OBJ                                               !2, 'htmlAttribute'
         21        OP_DATA                                                  ~17
   24    22        ASSIGN                                                   !3, 0
   26    23      > FE_RESET_R                                       $19     !1, ->32
         24    > > FE_FETCH_R                                               $19, !4, ->32
   28    25    >   CONCAT                                           ~20     !3, '%3A'
         26        CONCAT                                           ~21     ~20, '%0A'
         27        CONCAT                                           ~22     ~21, !4
         28        CONCAT                                           ~23     ~22, '%0A'
         29        ECHO                                                     ~23
   30    30        ASSIGN_OP                                     1          !3, 1
   26    31      > JMP                                                      ->24
         32    >   FE_FREE                                                  $19
   33    33        CONCAT                                           ~25     '%3Cimg+src%3D%22', !0
         34        CONCAT                                           ~26     ~25, '%22+%2F%3E'
         35        ECHO                                                     ~26
   35    36    > > RETURN                                                   1

Class Image: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.82 ms | 1400 KiB | 15 Q