3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [0,1,2,[3,4,[5,6]]]; $recit = new RecursiveArrayIterator($arr); $it = new RecursiveTreeIterator($recit); foreach($it as $key=>$val) { echo $key . '=>' . $val, PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 17
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 17
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/tCbtA
function name:  (null)
number of ops:  19
compiled vars:  !0 = $arr, !1 = $recit, !2 = $it, !3 = $val, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        NEW                                              $6      'RecursiveArrayIterator'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $6
    5     5        NEW                                              $9      'RecursiveTreeIterator'
          6        SEND_VAR_EX                                              !1
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !2, $9
    7     9      > FE_RESET_R                                       $12     !2, ->17
         10    > > FE_FETCH_R                                       ~13     $12, !3, ->17
         11    >   ASSIGN                                                   !4, ~13
    8    12        CONCAT                                           ~15     !4, '%3D%3E'
         13        CONCAT                                           ~16     ~15, !3
         14        ECHO                                                     ~16
         15        ECHO                                                     '%0A'
    7    16      > JMP                                                      ->10
         17    >   FE_FREE                                                  $12
    9    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.41 ms | 1394 KiB | 13 Q