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' ]; $d = [$a, $b, $c]; $defaults = array_fill_keys(array_keys(array_merge(...$d)), ''); var_export( array_map(fn($row) => array_merge($defaults, $row), $d) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/opuls
function name:  (null)
number of ops:  29
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $d, !4 = $defaults
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_ARRAY                                       ~8      !0
          4        ADD_ARRAY_ELEMENT                                ~8      !1
          5        ADD_ARRAY_ELEMENT                                ~8      !2
          6        ASSIGN                                                   !3, ~8
   22     7        INIT_FCALL                                               'array_fill_keys'
          8        INIT_FCALL                                               'array_keys'
          9        INIT_FCALL                                               'array_merge'
         10        SEND_UNPACK                                              !3
         11        CHECK_UNDEF_ARGS                                         
         12        DO_ICALL                                         $10     
         13        SEND_VAR                                                 $10
         14        DO_ICALL                                         $11     
         15        SEND_VAR                                                 $11
         16        SEND_VAL                                                 ''
         17        DO_ICALL                                         $12     
         18        ASSIGN                                                   !4, $12
   23    19        INIT_FCALL                                               'var_export'
   24    20        INIT_FCALL                                               'array_map'
         21        DECLARE_LAMBDA_FUNCTION                          ~14     [0]
         22        BIND_LEXICAL                                             ~14, !4
         23        SEND_VAL                                                 ~14
         24        SEND_VAR                                                 !3
         25        DO_ICALL                                         $15     
         26        SEND_VAR                                                 $15
   23    27        DO_ICALL                                                 
   25    28      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/opuls
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $row, !1 = $defaults
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        INIT_FCALL                                               'array_merge'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6      > RETURN                                                   $2
          7*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.11 ms | 1007 KiB | 18 Q