3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array('a' => 'one', 'b' => 'two'); $b=array('a' => 'three', 'b' => 'four', 'c' => 'five'); //not a union of arrays' values echo '$a + $b : '; print_r ($a + $b); //a union of arrays' values echo "array_unique(array_merge($a,$b)):"; // cribbed from http://oreilly.com/catalog/progphp/chapter/ch05.html print_r (array_unique(array_merge($a,$b)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o5h63
function name:  (null)
number of ops:  24
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
    6     2        ECHO                                                     '%24a+%2B+%24b+%3A+'
    7     3        INIT_FCALL                                               'print_r'
          4        ADD                                              ~4      !0, !1
          5        SEND_VAL                                                 ~4
          6        DO_ICALL                                                 
   10     7        ROPE_INIT                                     5  ~7      'array_unique%28array_merge%28'
          8        ROPE_ADD                                      1  ~7      ~7, !0
          9        ROPE_ADD                                      2  ~7      ~7, '%2C'
         10        ROPE_ADD                                      3  ~7      ~7, !1
         11        ROPE_END                                      4  ~6      ~7, '%29%29%3A'
         12        ECHO                                                     ~6
   12    13        INIT_FCALL                                               'print_r'
         14        INIT_FCALL                                               'array_unique'
         15        INIT_FCALL                                               'array_merge'
         16        SEND_VAR                                                 !0
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                         $10     
         19        SEND_VAR                                                 $10
         20        DO_ICALL                                         $11     
         21        SEND_VAR                                                 $11
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.39 ms | 1395 KiB | 19 Q