3v4l.org

run code in 300+ PHP versions simultaneously
<?php $directoryPath= "WEB-INF/classes/test.java"; $directoryhandler = opendir($path); function showFilesFolders ($path){ while($element = readdir($directoryhandler)!== false ){ if(substr($item, 0, 1)!="."){ if(is_dir($element)){ echo "$element is Folder \n"; } else{ echo "$element is file \n"; } } } } showFilesFolders ($directoryPath); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3L5qe
function name:  (null)
number of ops:  9
compiled vars:  !0 = $directoryPath, !1 = $directoryhandler, !2 = $path
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'WEB-INF%2Fclasses%2Ftest.java'
    3     1        INIT_FCALL                                               'opendir'
          2        SEND_VAR                                                 !2
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
   19     5        INIT_FCALL                                               'showfilesfolders'
          6        SEND_VAR                                                 !0
          7        DO_FCALL                                      0          
   22     8      > RETURN                                                   1

Function showfilesfolders:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 2
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 20
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 17
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 2
Branch analysis from position: 26
Branch analysis from position: 2
Branch analysis from position: 20
filename:       /in/3L5qe
function name:  showFilesFolders
number of ops:  27
compiled vars:  !0 = $path, !1 = $item, !2 = $element, !3 = $directoryhandler
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1      > JMP                                                      ->20
    7     2    >   INIT_FCALL                                               'substr'
          3        SEND_VAR                                                 !1
          4        SEND_VAL                                                 0
          5        SEND_VAL                                                 1
          6        DO_ICALL                                         $4      
          7        IS_NOT_EQUAL                                             $4, '.'
          8      > JMPZ                                                     ~5, ->20
    9     9    >   INIT_FCALL                                               'is_dir'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $6      
         12      > JMPZ                                                     $6, ->17
   10    13    >   NOP                                                      
         14        FAST_CONCAT                                      ~7      !2, '+is+Folder+%0A'
         15        ECHO                                                     ~7
         16      > JMP                                                      ->20
   13    17    >   NOP                                                      
         18        FAST_CONCAT                                      ~8      !2, '+is+file+%0A'
         19        ECHO                                                     ~8
    6    20    >   INIT_FCALL                                               'readdir'
         21        SEND_VAR                                                 !3
         22        DO_ICALL                                         $9      
         23        TYPE_CHECK                                  1018  ~10     $9
         24        ASSIGN                                           ~11     !2, ~10
         25      > JMPNZ                                                    ~11, ->2
   17    26    > > RETURN                                                   null

End of function showfilesfolders

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.63 ms | 1403 KiB | 22 Q