3v4l.org

run code in 300+ PHP versions simultaneously
<?php $d = new RecursiveDirectoryIterator('.'); $tree = new RecursiveTreeIterator($d); $limit = new LimitIterator($tree, 0, 20); echo '<pre>'; foreach($limit as $element) { echo $element . PHP_EOL; } echo '</pre>';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 20
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 20
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/4WfXC
function name:  (null)
number of ops:  23
compiled vars:  !0 = $d, !1 = $tree, !2 = $limit, !3 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'RecursiveDirectoryIterator'
          1        SEND_VAL_EX                                              '.'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
    4     4        NEW                                              $7      'RecursiveTreeIterator'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $7
    6     8        NEW                                              $10     'LimitIterator'
          9        SEND_VAR_EX                                              !1
         10        SEND_VAL_EX                                              0
         11        SEND_VAL_EX                                              20
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !2, $10
    8    14        ECHO                                                     '%3Cpre%3E'
    9    15      > FE_RESET_R                                       $13     !2, ->20
         16    > > FE_FETCH_R                                               $13, !3, ->20
   10    17    >   CONCAT                                           ~14     !3, '%0A'
         18        ECHO                                                     ~14
    9    19      > JMP                                                      ->16
         20    >   FE_FREE                                                  $13
   12    21        ECHO                                                     '%3C%2Fpre%3E'
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.54 ms | 1394 KiB | 13 Q