3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.03 ms | 1385 KiB | 13 Q