3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = ['1' => 'test1','2' => 'test2' ]; $array2 = ['1' => 'test1']; if (is_array($array1) && is_array($array2)){ $array =array_unique(array_merge($array1, $array2)); } var_dump($array); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 15
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
Branch analysis from position: 6
filename:       /in/dVHoV
function name:  (null)
number of ops:  19
compiled vars:  !0 = $array1, !1 = $array2, !2 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, <array>
    6     1        ASSIGN                                                   !1, <array>
    8     2        TYPE_CHECK                                  128  ~5      !0
          3      > JMPZ_EX                                          ~5      ~5, ->6
          4    >   TYPE_CHECK                                  128  ~6      !1
          5        BOOL                                             ~5      ~6
          6    > > JMPZ                                                     ~5, ->15
    9     7    >   INIT_FCALL                                               'array_unique'
          8        INIT_FCALL                                               'array_merge'
          9        SEND_VAR                                                 !0
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $7      
         12        SEND_VAR                                                 $7
         13        DO_ICALL                                         $8      
         14        ASSIGN                                                   !2, $8
   11    15    >   INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                                 
   13    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.74 ms | 1395 KiB | 19 Q