3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.95 ms | 1399 KiB | 13 Q