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 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 = 8, Position 2 = 13
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/aVaXR
function name:  (null)
number of ops:  18
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      'RecursiveArrayIterator'
          2        SEND_VAR_EX                                              !0
          3        SEND_VAL_EX                                              4
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $6
   17     6        ASSIGN                                                   !2, <array>
   19     7      > FE_RESET_R                                       $10     !1, ->13
          8    > > FE_FETCH_R                                       ~11     $10, !3, ->13
          9    >   ASSIGN                                                   !4, ~11
   20    10        ASSIGN_DIM                                               !2, !4
         11        OP_DATA                                                  !3
   19    12      > JMP                                                      ->8
         13    >   FE_FREE                                                  $10
   23    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.39 ms | 1399 KiB | 15 Q