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 = 14, Position 2 = 29
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 29
Branch analysis from position: 15
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 27
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 27
Branch analysis from position: 17
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 25
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 25
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 25
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 27
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
filename:       /in/KmA0b
function name:  (null)
number of ops:  34
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>
   12     1        FETCH_CONSTANT                                   ~10     'Tortoise'
          2        INIT_ARRAY                                       ~11     ~10, 'name'
          3        INIT_ARRAY                                       ~12     ~11, 0
   15     4        FETCH_CONSTANT                                   ~13     'Black'
          5        INIT_ARRAY                                       ~14     ~13, 'name'
          6        ADD_ARRAY_ELEMENT                                ~12     ~14, 1
   10     7        ASSIGN                                                   !1, ~12
   18     8        ASSIGN                                                   !2, <array>
   27     9        ASSIGN                                                   !3, <array>
   28    10        INIT_ARRAY                                       ~18     !0
         11        ADD_ARRAY_ELEMENT                                ~18     !1
         12        ADD_ARRAY_ELEMENT                                ~18     !2
         13      > FE_RESET_R                                       $19     ~18, ->29
         14    > > FE_FETCH_R                                               $19, !4, ->29
   29    15    > > FE_RESET_R                                       $20     !4, ->27
         16    > > FE_FETCH_R                                       ~21     $20, !5, ->27
         17    >   ASSIGN                                                   !6, ~21
   30    18      > FE_RESET_R                                       $23     !5, ->25
         19    > > FE_FETCH_R                                       ~24     $23, !7, ->25
         20    >   ASSIGN                                                   !8, ~24
   31    21        FETCH_DIM_W                                      $26     !3, !6
         22        ASSIGN_DIM                                               $26, !8
         23        OP_DATA                                                  !7
   30    24      > JMP                                                      ->19
         25    >   FE_FREE                                                  $23
   29    26      > JMP                                                      ->16
         27    >   FE_FREE                                                  $20
   28    28      > JMP                                                      ->14
         29    >   FE_FREE                                                  $19
   36    30        INIT_FCALL                                               'print_r'
         31        SEND_VAR                                                 !3
         32        DO_ICALL                                                 
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.09 ms | 945 KiB | 16 Q