3v4l.org

run code in 300+ PHP versions simultaneously
<?php function rec($dir, $depth, $root) { $dir = dir('/dev/fd'); while ($entry = $dir->read()) { echo $depth . $entry . "\n"; if (is_dir($root . $entry)) { rec($dir, $depth . " ", $root . '/' . $entry); } } } rec('/', '', '/');

Abusive script

This script was stopped while abusing our resources

Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DLTSR
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'rec'
          1        SEND_VAL                                                 '%2F'
          2        SEND_VAL                                                 ''
          3        SEND_VAL                                                 '%2F'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function rec

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.02 ms | 1407 KiB | 18 Q