3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = ['a',['b','c','d'],['e',['f','g']]]; // only covers the first row foreach(new RecursiveArrayIterator($data) as $item) { echo $item . "\n"; } // recursively finds all items foreach(new RecursiveIteratorIterator(new RecursiveArrayIterator($data)) as $item) { echo $item . "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 9
2 jumps found. (Code = 77) Position 1 = 17, Position 2 = 21
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 21
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
Branch analysis from position: 9
filename:       /in/WvoSG
function name:  (null)
number of ops:  23
compiled vars:  !0 = $data, !1 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    6     1        NEW                                              $3      'RecursiveArrayIterator'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4      > FE_RESET_R                                       $5      $3, ->9
          5    > > FE_FETCH_R                                               $5, !1, ->9
    7     6    >   CONCAT                                           ~6      !1, '%0A'
          7        ECHO                                                     ~6
    6     8      > JMP                                                      ->5
          9    >   FE_FREE                                                  $5
   11    10        NEW                                              $7      'RecursiveIteratorIterator'
         11        NEW                                              $8      'RecursiveArrayIterator'
         12        SEND_VAR_EX                                              !0
         13        DO_FCALL                                      0          
         14        SEND_VAR_NO_REF_EX                                       $8
         15        DO_FCALL                                      0          
         16      > FE_RESET_R                                       $11     $7, ->21
         17    > > FE_FETCH_R                                               $11, !1, ->21
   12    18    >   CONCAT                                           ~12     !1, '%0A'
         19        ECHO                                                     ~12
   11    20      > JMP                                                      ->17
         21    >   FE_FREE                                                  $11
   13    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.47 ms | 1394 KiB | 13 Q