3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array( '123' => array(1) ); $b = array( '123' => array(2, 3) ); foreach ($b as $k => $v) { $a[$k] = array_merge($a[$k] ?? [], $v); } var_export($a);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 15
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 15
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/onXcQ
function name:  (null)
number of ops:  20
compiled vars:  !0 = $a, !1 = $b, !2 = $v, !3 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    6     1        ASSIGN                                                   !1, <array>
   10     2      > FE_RESET_R                                       $6      !1, ->15
          3    > > FE_FETCH_R                                       ~7      $6, !2, ->15
          4    >   ASSIGN                                                   !3, ~7
   11     5        INIT_FCALL                                               'array_merge'
          6        FETCH_DIM_IS                                     ~10     !0, !3
          7        COALESCE                                         ~11     ~10
          8        QM_ASSIGN                                        ~11     <array>
          9        SEND_VAL                                                 ~11
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $12     
         12        ASSIGN_DIM                                               !0, !3
         13        OP_DATA                                                  $12
   10    14      > JMP                                                      ->3
         15    >   FE_FREE                                                  $6
   13    16        INIT_FCALL                                               'var_export'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.22 ms | 1005 KiB | 15 Q