3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [ 'a' => [ 'a1' => 'a1', 'a2' => 'a2', 'a3' => 'a3', ], 'b' => [ 'b1' => 'b1', 'b2' => 'b2', 'b3' => 'b3', ], ]; $it = new RecursiveIteratorIterator(RecursiveArrayIterator($a, RecursiveArrayIterator::CHILD_ARRAYS_ONLY)); $b = []; foreach ($it as $key => $value) { $b[$key] = $value; } var_dump($b);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/uRZ8j
function name:  (null)
number of ops:  21
compiled vars:  !0 = $a, !1 = $it, !2 = $b, !3 = $value, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   16     1        NEW                                              $6      'RecursiveIteratorIterator'
          2        INIT_FCALL_BY_NAME                                       'RecursiveArrayIterator'
          3        SEND_VAR_EX                                              !0
          4        SEND_VAL_EX                                              4
          5        DO_FCALL                                      0  $7      
          6        SEND_VAR_NO_REF_EX                                       $7
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $6
   17     9        ASSIGN                                                   !2, <array>
   19    10      > FE_RESET_R                                       $11     !1, ->16
         11    > > FE_FETCH_R                                       ~12     $11, !3, ->16
         12    >   ASSIGN                                                   !4, ~12
   20    13        ASSIGN_DIM                                               !2, !4
         14        OP_DATA                                                  !3
   19    15      > JMP                                                      ->11
         16    >   FE_FREE                                                  $11
   23    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
210.09 ms | 1399 KiB | 15 Q