3v4l.org

run code in 300+ PHP versions simultaneously
<?php $bad=array(); $good=array(); $a=['a','b','c']; $b=['c','d','e']; $bad += $a; $bad += $b; print_r($bad); $good = array_unique(array_merge($good, $a)); $good = array_unique(array_merge($good, $b)); print_r($good);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FeKsQ
function name:  (null)
number of ops:  29
compiled vars:  !0 = $bad, !1 = $good, !2 = $a, !3 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    5     2        ASSIGN                                                   !2, <array>
    6     3        ASSIGN                                                   !3, <array>
    8     4        ASSIGN_OP                                     1          !0, !2
    9     5        ASSIGN_OP                                     1          !0, !3
   10     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
   12     9        INIT_FCALL                                               'array_unique'
         10        INIT_FCALL                                               'array_merge'
         11        SEND_VAR                                                 !1
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                         $11     
         14        SEND_VAR                                                 $11
         15        DO_ICALL                                         $12     
         16        ASSIGN                                                   !1, $12
   13    17        INIT_FCALL                                               'array_unique'
         18        INIT_FCALL                                               'array_merge'
         19        SEND_VAR                                                 !1
         20        SEND_VAR                                                 !3
         21        DO_ICALL                                         $14     
         22        SEND_VAR                                                 $14
         23        DO_ICALL                                         $15     
         24        ASSIGN                                                   !1, $15
   14    25        INIT_FCALL                                               'print_r'
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.77 ms | 1004 KiB | 16 Q