3v4l.org

run code in 300+ PHP versions simultaneously
<?php function rec($dir, $depth) { $d = dir($dir); if (!$d) return; while ($entry = $d->read()) { if ($entry == '.' || $entry == '..') continue; echo $depth . $entry . "\n"; if (is_dir($dir . '/' . $entry)) { //rec($dir . '/' . $entry, $depth . " "); } } } rec('/', '');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XAPDP
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'rec'
          1        SEND_VAL                                                 '%2F'
          2        SEND_VAL                                                 ''
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function rec:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 10
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 47) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 25
Branch analysis from position: 25
Branch analysis from position: 25
Branch analysis from position: 14
filename:       /in/XAPDP
function name:  rec
number of ops:  30
compiled vars:  !0 = $dir, !1 = $depth, !2 = $d, !3 = $entry
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        INIT_FCALL                                               'dir'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !2, $4
    5     6        BOOL_NOT                                         ~6      !2
          7      > JMPZ                                                     ~6, ->9
          8    > > RETURN                                                   null
    6     9    > > JMP                                                      ->25
    7    10    >   IS_EQUAL                                         ~7      !3, '.'
         11      > JMPNZ_EX                                         ~7      ~7, ->14
         12    >   IS_EQUAL                                         ~8      !3, '..'
         13        BOOL                                             ~7      ~8
         14    > > JMPZ                                                     ~7, ->16
         15    > > JMP                                                      ->25
    8    16    >   CONCAT                                           ~9      !1, !3
         17        CONCAT                                           ~10     ~9, '%0A'
         18        ECHO                                                     ~10
    9    19        INIT_FCALL                                               'is_dir'
         20        CONCAT                                           ~11     !0, '%2F'
         21        CONCAT                                           ~12     ~11, !3
         22        SEND_VAL                                                 ~12
         23        DO_ICALL                                         $13     
         24      > JMPZ                                                     $13, ->25
    6    25    >   INIT_METHOD_CALL                                         !2, 'read'
         26        DO_FCALL                                      0  $14     
         27        ASSIGN                                           ~15     !3, $14
         28      > JMPNZ                                                    ~15, ->10
   13    29    > > RETURN                                                   null

End of function rec

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.05 ms | 1402 KiB | 18 Q