3v4l.org

run code in 300+ PHP versions simultaneously
<?php $projectRoot = sys_get_temp_dir() . "/test2"; mkdir($projectRoot, 0777, true); touch("$projectRoot/file1.php"); mkdir("$projectRoot/folder", 0777, true); touch("$projectRoot/folder/evenmoar.php"); touch("$projectRoot/folder/moarcode.php"); chdir($projectRoot); $dirIterator = new RecursiveDirectoryIterator(".", FilesystemIterator::SKIP_DOTS); $iterator = new RecursiveIteratorIterator($dirIterator); foreach($iterator as $file) { echo $file; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 44, Position 2 = 47
Branch analysis from position: 44
2 jumps found. (Code = 78) Position 1 = 45, Position 2 = 47
Branch analysis from position: 45
1 jumps found. (Code = 42) Position 1 = 44
Branch analysis from position: 44
Branch analysis from position: 47
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 47
filename:       /in/7ADiJ
function name:  (null)
number of ops:  49
compiled vars:  !0 = $projectRoot, !1 = $dirIterator, !2 = $iterator, !3 = $file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'sys_get_temp_dir'
          1        DO_ICALL                                         $4      
          2        CONCAT                                           ~5      $4, '%2Ftest2'
          3        ASSIGN                                                   !0, ~5
    4     4        INIT_FCALL                                               'mkdir'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 511
          7        SEND_VAL                                                 <true>
          8        DO_ICALL                                                 
    5     9        INIT_FCALL                                               'touch'
         10        NOP                                                      
         11        FAST_CONCAT                                      ~8      !0, '%2Ffile1.php'
         12        SEND_VAL                                                 ~8
         13        DO_ICALL                                                 
    6    14        INIT_FCALL                                               'mkdir'
         15        NOP                                                      
         16        FAST_CONCAT                                      ~10     !0, '%2Ffolder'
         17        SEND_VAL                                                 ~10
         18        SEND_VAL                                                 511
         19        SEND_VAL                                                 <true>
         20        DO_ICALL                                                 
    7    21        INIT_FCALL                                               'touch'
         22        NOP                                                      
         23        FAST_CONCAT                                      ~12     !0, '%2Ffolder%2Fevenmoar.php'
         24        SEND_VAL                                                 ~12
         25        DO_ICALL                                                 
    8    26        INIT_FCALL                                               'touch'
         27        NOP                                                      
         28        FAST_CONCAT                                      ~14     !0, '%2Ffolder%2Fmoarcode.php'
         29        SEND_VAL                                                 ~14
         30        DO_ICALL                                                 
   10    31        INIT_FCALL                                               'chdir'
         32        SEND_VAR                                                 !0
         33        DO_ICALL                                                 
   11    34        NEW                                              $17     'RecursiveDirectoryIterator'
         35        SEND_VAL_EX                                              '.'
         36        SEND_VAL_EX                                              4096
         37        DO_FCALL                                      0          
         38        ASSIGN                                                   !1, $17
   12    39        NEW                                              $20     'RecursiveIteratorIterator'
         40        SEND_VAR_EX                                              !1
         41        DO_FCALL                                      0          
         42        ASSIGN                                                   !2, $20
   13    43      > FE_RESET_R                                       $23     !2, ->47
         44    > > FE_FETCH_R                                               $23, !3, ->47
   14    45    >   ECHO                                                     !3
   13    46      > JMP                                                      ->44
         47    >   FE_FREE                                                  $23
   15    48      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.32 ms | 1400 KiB | 21 Q