3v4l.org

run code in 300+ PHP versions simultaneously
<?php $directory="path/to/slides"; try { // Styling for images echo '<div id="'.$moduleId.'-'.$module->id.'" class="cycle-slideshow">'; foreach ( new DirectoryIterator($directory) as $item ) { if ($item->isFile() && $item->getExtension() == "jpg") { $path = $directory . '/' . $item; echo '<img src="' . $path . '"/>'; } } echo '</div>'; } catch(Exception $e) { echo JText::_( 'DWCSLIDEERROR' ); echo 'Caught exception: '. $e->getMessage(). "<br>"; echo get_class($e) . ": " . $e->getMessage(); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 27
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 27
Branch analysis from position: 12
2 jumps found. (Code = 46) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 26
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 26
Branch analysis from position: 19
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
Found catch point at position: 30
Branch analysis from position: 30
2 jumps found. (Code = 107) Position 1 = 31, Position 2 = -2
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rKZrU
function name:  (null)
number of ops:  47
compiled vars:  !0 = $directory, !1 = $moduleId, !2 = $module, !3 = $item, !4 = $path, !5 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'path%2Fto%2Fslides'
    5     1        CONCAT                                           ~7      '%3Cdiv+id%3D%22', !1
          2        CONCAT                                           ~8      ~7, '-'
          3        FETCH_OBJ_R                                      ~9      !2, 'id'
          4        CONCAT                                           ~10     ~8, ~9
          5        CONCAT                                           ~11     ~10, '%22+class%3D%22cycle-slideshow%22%3E'
          6        ECHO                                                     ~11
    6     7        NEW                                              $12     'DirectoryIterator'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0          
         10      > FE_RESET_R                                       $14     $12, ->27
         11    > > FE_FETCH_R                                               $14, !3, ->27
    7    12    >   INIT_METHOD_CALL                                         !3, 'isFile'
         13        DO_FCALL                                      0  $15     
         14      > JMPZ_EX                                          ~16     $15, ->19
         15    >   INIT_METHOD_CALL                                         !3, 'getExtension'
         16        DO_FCALL                                      0  $17     
         17        IS_EQUAL                                         ~18     $17, 'jpg'
         18        BOOL                                             ~16     ~18
         19    > > JMPZ                                                     ~16, ->26
    8    20    >   CONCAT                                           ~19     !0, '%2F'
         21        CONCAT                                           ~20     ~19, !3
         22        ASSIGN                                                   !4, ~20
    9    23        CONCAT                                           ~22     '%3Cimg+src%3D%22', !4
         24        CONCAT                                           ~23     ~22, '%22%2F%3E'
         25        ECHO                                                     ~23
    6    26    > > JMP                                                      ->11
         27    >   FE_FREE                                                  $14
   12    28        ECHO                                                     '%3C%2Fdiv%3E'
         29      > JMP                                                      ->46
   14    30  E > > CATCH                                       last         'Exception'
   15    31    >   INIT_STATIC_METHOD_CALL                                  'JText', '_'
         32        SEND_VAL_EX                                              'DWCSLIDEERROR'
         33        DO_FCALL                                      0  $24     
         34        ECHO                                                     $24
   16    35        INIT_METHOD_CALL                                         !5, 'getMessage'
         36        DO_FCALL                                      0  $25     
         37        CONCAT                                           ~26     'Caught+exception%3A+', $25
         38        CONCAT                                           ~27     ~26, '%3Cbr%3E'
         39        ECHO                                                     ~27
   17    40        GET_CLASS                                        ~28     !5
         41        CONCAT                                           ~29     ~28, '%3A+'
         42        INIT_METHOD_CALL                                         !5, 'getMessage'
         43        DO_FCALL                                      0  $30     
         44        CONCAT                                           ~31     ~29, $30
         45        ECHO                                                     ~31
   18    46    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.84 ms | 1399 KiB | 13 Q