3v4l.org

run code in 300+ PHP versions simultaneously
<?php eval('$rawarray = ' . "array('a', 'b', array(array('c'), 'd'), 'e', array('f'), 'g')"); $return = array(); $iterator = new RecursiveIteratorIterator(new RecursiveArrayIterator($rawarray)); foreach ($iterator as $value) { $return[] = $value; } print_r($return);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 14
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/r3iQ6
function name:  (null)
number of ops:  19
compiled vars:  !0 = $return, !1 = $iterator, !2 = $rawarray, !3 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INCLUDE_OR_EVAL                                          '%24rawarray+%3D+array%28%27a%27%2C+%27b%27%2C+array%28array%28%27c%27%29%2C+%27d%27%29%2C+%27e%27%2C+array%28%27f%27%29%2C+%27g%27%29', EVAL
    5     1        ASSIGN                                                   !0, <array>
    7     2        NEW                                              $6      'RecursiveIteratorIterator'
          3        NEW                                              $7      'RecursiveArrayIterator'
          4        SEND_VAR_EX                                              !2
          5        DO_FCALL                                      0          
          6        SEND_VAR_NO_REF_EX                                       $7
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $6
    9     9      > FE_RESET_R                                       $11     !1, ->14
         10    > > FE_FETCH_R                                               $11, !3, ->14
   10    11    >   ASSIGN_DIM                                               !0
         12        OP_DATA                                                  !3
    9    13      > JMP                                                      ->10
         14    >   FE_FREE                                                  $11
   13    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.41 ms | 1395 KiB | 15 Q