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_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 = 12
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
Branch analysis from position: 6
filename:       /in/pq0sE
function name:  (null)
number of ops:  16
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, ->12
    9     7    >   INIT_FCALL                                               'array_merge'
          8        SEND_VAR                                                 !0
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $7      
         11        ASSIGN                                                   !2, $7
   11    12    >   INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
   13    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.29 ms | 1394 KiB | 17 Q