3v4l.org

run code in 300+ PHP versions simultaneously
<?php function GalleryList() { echo ' <div class="GalleryGrid"> <ul>'; error_reporting(E_ALL); $thumbs = array_diff(scandir('images/Thumbs'),array ('..','.','Thumbs.db')); foreach ($thumbs as $key => $current) { $imagelist[filectime('images/Thumbs/'.$current)] = $current; } krsort($imagelist); foreach ($imagelist as $key => $thumb) { $fullImage = substr($thumb,6); echo '<li><a href="images/'.$fullImage.'"><img src="images/Thumbs/'.$thumb.'"> </a> </li>'.PHP_EOL; } echo '</ul>'; } GalleryList();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8X2Sl
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   INIT_FCALL                                               'gallerylist'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Function gallerylist:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 22
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 22
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 22
2 jumps found. (Code = 77) Position 1 = 27, Position 2 = 41
Branch analysis from position: 27
2 jumps found. (Code = 78) Position 1 = 28, Position 2 = 41
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 41
Branch analysis from position: 22
filename:       /in/8X2Sl
function name:  GalleryList
number of ops:  44
compiled vars:  !0 = $thumbs, !1 = $current, !2 = $key, !3 = $imagelist, !4 = $thumb, !5 = $fullImage
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ECHO                                                     '%0A++++%3Cdiv+class%3D%22GalleryGrid%22%3E%0A++++++%3Cul%3E'
    6     1        INIT_FCALL                                               'error_reporting'
          2        SEND_VAL                                                 32767
          3        DO_ICALL                                                 
    8     4        INIT_FCALL                                               'array_diff'
          5        INIT_FCALL                                               'scandir'
          6        SEND_VAL                                                 'images%2FThumbs'
          7        DO_ICALL                                         $7      
          8        SEND_VAR                                                 $7
          9        SEND_VAL                                                 <array>
         10        DO_ICALL                                         $8      
         11        ASSIGN                                                   !0, $8
    9    12      > FE_RESET_R                                       $10     !0, ->22
         13    > > FE_FETCH_R                                       ~11     $10, !1, ->22
         14    >   ASSIGN                                                   !2, ~11
   10    15        INIT_FCALL                                               'filectime'
         16        CONCAT                                           ~13     'images%2FThumbs%2F', !1
         17        SEND_VAL                                                 ~13
         18        DO_ICALL                                         $14     
         19        ASSIGN_DIM                                               !3, $14
         20        OP_DATA                                                  !1
    9    21      > JMP                                                      ->13
         22    >   FE_FREE                                                  $10
   12    23        INIT_FCALL                                               'krsort'
         24        SEND_REF                                                 !3
         25        DO_ICALL                                                 
   15    26      > FE_RESET_R                                       $17     !3, ->41
         27    > > FE_FETCH_R                                       ~18     $17, !4, ->41
         28    >   ASSIGN                                                   !2, ~18
   16    29        INIT_FCALL                                               'substr'
         30        SEND_VAR                                                 !4
         31        SEND_VAL                                                 6
         32        DO_ICALL                                         $20     
         33        ASSIGN                                                   !5, $20
   19    34        CONCAT                                           ~22     '%3Cli%3E%3Ca+href%3D%22images%2F', !5
         35        CONCAT                                           ~23     ~22, '%22%3E%3Cimg+src%3D%22images%2FThumbs%2F'
         36        CONCAT                                           ~24     ~23, !4
         37        CONCAT                                           ~25     ~24, '%22%3E+%3C%2Fa%3E+%3C%2Fli%3E'
         38        CONCAT                                           ~26     ~25, '%0A'
         39        ECHO                                                     ~26
   15    40      > JMP                                                      ->27
         41    >   FE_FREE                                                  $17
   22    42        ECHO                                                     '%3C%2Ful%3E'
   27    43      > RETURN                                                   null

End of function gallerylist

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.44 ms | 1394 KiB | 26 Q