3v4l.org

run code in 300+ PHP versions simultaneously
<? $dir = '\\'; $d = array(); $arr = opendir($dir); while($v = readdir($arr)) { if($v == '.' or $v == '..') continue; if(!is_dir($dir.DIRECTORY_SEPARATOR.$v)) $d[] = $v; if(is_dir($dir.DIRECTORY_SEPARATOR.$v)) $d[$v] = scan($dir.DIRECTORY_SEPARATOR.$v); } return $d;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 7
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 47) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 22
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 35
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 7
Branch analysis from position: 40
Branch analysis from position: 7
Branch analysis from position: 35
Branch analysis from position: 22
Branch analysis from position: 11
filename:       /in/v4ZSG
function name:  (null)
number of ops:  42
compiled vars:  !0 = $dir, !1 = $d, !2 = $arr, !3 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%5C'
    3     1        ASSIGN                                                   !1, <array>
    5     2        INIT_FCALL                                               'opendir'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !2, $6
    9     6      > JMP                                                      ->35
   13     7    >   IS_EQUAL                                         ~8      !3, '.'
          8      > JMPNZ_EX                                         ~8      ~8, ->11
          9    >   IS_EQUAL                                         ~9      !3, '..'
         10        BOOL                                             ~8      ~9
         11    > > JMPZ                                                     ~8, ->13
         12    > > JMP                                                      ->35
   15    13    >   INIT_FCALL                                               'is_dir'
         14        CONCAT                                           ~10     !0, '%2F'
         15        CONCAT                                           ~11     ~10, !3
         16        SEND_VAL                                                 ~11
         17        DO_ICALL                                         $12     
         18        BOOL_NOT                                         ~13     $12
         19      > JMPZ                                                     ~13, ->22
         20    >   ASSIGN_DIM                                               !1
         21        OP_DATA                                                  !3
   17    22    >   INIT_FCALL                                               'is_dir'
         23        CONCAT                                           ~15     !0, '%2F'
         24        CONCAT                                           ~16     ~15, !3
         25        SEND_VAL                                                 ~16
         26        DO_ICALL                                         $17     
         27      > JMPZ                                                     $17, ->35
         28    >   INIT_FCALL_BY_NAME                                       'scan'
         29        CONCAT                                           ~19     !0, '%2F'
         30        CONCAT                                           ~20     ~19, !3
         31        SEND_VAL_EX                                              ~20
         32        DO_FCALL                                      0  $21     
         33        ASSIGN_DIM                                               !1, !3
         34        OP_DATA                                                  $21
    9    35    >   INIT_FCALL                                               'readdir'
         36        SEND_VAR                                                 !2
         37        DO_ICALL                                         $22     
         38        ASSIGN                                           ~23     !3, $22
         39      > JMPNZ                                                    ~23, ->7
   23    40    > > RETURN                                                   !1
         41*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.56 ms | 1400 KiB | 19 Q