3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = array( array( array( array( 'leaf-0-0-0-0' => array ( 'whawtever' ), 'leaf-0-0-0-1' ), 'leaf-0-0-0' ), 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), 'LEAVES_ONLY' ); foreach ($iterator as $key => $leaf) { echo "$key => $leaf", PHP_EOL; }
based on NfCLm
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/1WEtf
function name:  (null)
number of ops:  20
compiled vars:  !0 = $array, !1 = $iterator, !2 = $leaf, !3 = $key
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   7     0  E >   ASSIGN                                                   !0, <array>
  25     1        NEW                                              $5      :-4
  26     2        NEW                                              $6      :-2
         3        SEND_VAR_EX                                              !0
         4        DO_FCALL                                      0          
         5        SEND_VAR_NO_REF_EX                                       $6
  27     6        SEND_VAL_EX                                              'LEAVES_ONLY'
         7        DO_FCALL                                      0          
         8        ASSIGN                                                   !1, $5
  29     9      > FE_RESET_R                                       $10     !1, ->18
        10    > > FE_FETCH_R                                       ~11     $10, !2, ->18
        11    >   ASSIGN                                                   !3, ~11
  30    12        ROPE_INIT                                     3  ~14     !3
        13        ROPE_ADD                                      1  ~14     ~14, '+%3D%3E+'
        14        ROPE_END                                      2  ~13     ~14, !2
        15        ECHO                                                     ~13
        16        ECHO                                                     '%0A'
        17      > JMP                                                      ->10
        18    >   FE_FREE                                                  $10
  31    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0