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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.87 ms | 1395 KiB | 15 Q