3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = Array ( '0' => Array ( 'var_id' => 43 ), '1' => Array ( 'var_id' => 25 ) ); $array2 = Array ( '0' => Array ( 'name' => 'Tortoise' ), '1' => Array ( 'name' => 'Black' ) ); $array3 = Array ( '0' => Array ( 'id' => 1907 ), '1' => Array ( 'id' => 1908 ) ); $final = array(); foreach(array($array1, $array2, $array3) AS $array) { foreach($array AS $key => $value) { foreach($value AS $subkey => $subvalue) { $final[$key][$subkey] = $subvalue; } } } print_r($final);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 23
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 23
Branch analysis from position: 9
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 21
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 21
Branch analysis from position: 11
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 19
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 19
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 19
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 21
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/GY9oa
function name:  (null)
number of ops:  28
compiled vars:  !0 = $array1, !1 = $array2, !2 = $array3, !3 = $final, !4 = $array, !5 = $value, !6 = $key, !7 = $subvalue, !8 = $subkey
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   10     1        ASSIGN                                                   !1, <array>
   18     2        ASSIGN                                                   !2, <array>
   27     3        ASSIGN                                                   !3, <array>
   28     4        INIT_ARRAY                                       ~13     !0
          5        ADD_ARRAY_ELEMENT                                ~13     !1
          6        ADD_ARRAY_ELEMENT                                ~13     !2
          7      > FE_RESET_R                                       $14     ~13, ->23
          8    > > FE_FETCH_R                                               $14, !4, ->23
   29     9    > > FE_RESET_R                                       $15     !4, ->21
         10    > > FE_FETCH_R                                       ~16     $15, !5, ->21
         11    >   ASSIGN                                                   !6, ~16
   30    12      > FE_RESET_R                                       $18     !5, ->19
         13    > > FE_FETCH_R                                       ~19     $18, !7, ->19
         14    >   ASSIGN                                                   !8, ~19
   31    15        FETCH_DIM_W                                      $21     !3, !6
         16        ASSIGN_DIM                                               $21, !8
         17        OP_DATA                                                  !7
   30    18      > JMP                                                      ->13
         19    >   FE_FREE                                                  $18
   29    20      > JMP                                                      ->10
         21    >   FE_FREE                                                  $15
   28    22      > JMP                                                      ->8
         23    >   FE_FREE                                                  $14
   36    24        INIT_FCALL                                               'print_r'
         25        SEND_VAR                                                 !3
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.48 ms | 1396 KiB | 15 Q