3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x1 = $x2 = array(); $y = array('foo' => 'bar'); $x1 += $y; $x2 = array_merge($x2, $y); var_dump($x1); var_dump($x2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AutRQ
function name:  (null)
number of ops:  16
compiled vars:  !0 = $x1, !1 = $x2, !2 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                           ~3      !1, <array>
          1        ASSIGN                                                   !0, ~3
    4     2        ASSIGN                                                   !2, <array>
    5     3        ASSIGN_OP                                     1          !0, !2
    6     4        INIT_FCALL                                               'array_merge'
          5        SEND_VAR                                                 !1
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !1, $7
    7     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
    8    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.48 ms | 1398 KiB | 17 Q