3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [ 'a' => 'some value', 'b' => 'some value', 'c' => 'some value' ]; $b = [ 'a' => 'another value', 'd' => 'another value', 'e' => 'another value', 'f' => 'another value' ]; $c = [ 'b' => 'some more value', 'x' => 'some more value', 'y' => 'some more value', 'z' => 'some more value' ]; $defaults = array_fill_keys(array_keys($a + $b + $c), ''); $result = ['one' => $a, 'two' => $b, 'three' => $c]; foreach ($result as $k => &$row) { $row = array_merge($defaults, $row); } var_export($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 18, Position 2 = 26
Branch analysis from position: 18
2 jumps found. (Code = 126) Position 1 = 19, Position 2 = 26
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/Dcee0
function name:  (null)
number of ops:  31
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $defaults, !4 = $result, !5 = $row, !6 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, <array>
   14     2        ASSIGN                                                   !2, <array>
   21     3        INIT_FCALL                                               'array_fill_keys'
          4        INIT_FCALL                                               'array_keys'
          5        ADD                                              ~10     !0, !1
          6        ADD                                              ~11     ~10, !2
          7        SEND_VAL                                                 ~11
          8        DO_ICALL                                         $12     
          9        SEND_VAR                                                 $12
         10        SEND_VAL                                                 ''
         11        DO_ICALL                                         $13     
         12        ASSIGN                                                   !3, $13
   22    13        INIT_ARRAY                                       ~15     !0, 'one'
         14        ADD_ARRAY_ELEMENT                                ~15     !1, 'two'
         15        ADD_ARRAY_ELEMENT                                ~15     !2, 'three'
         16        ASSIGN                                                   !4, ~15
   23    17      > FE_RESET_RW                                      $17     !4, ->26
         18    > > FE_FETCH_RW                                      ~18     $17, !5, ->26
         19    >   ASSIGN                                                   !6, ~18
   24    20        INIT_FCALL                                               'array_merge'
         21        SEND_VAR                                                 !3
         22        SEND_VAR                                                 !5
         23        DO_ICALL                                         $20     
         24        ASSIGN                                                   !5, $20
   23    25      > JMP                                                      ->18
         26    >   FE_FREE                                                  $17
   26    27        INIT_FCALL                                               'var_export'
         28        SEND_VAR                                                 !4
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.58 ms | 1006 KiB | 17 Q