3v4l.org

run code in 300+ PHP versions simultaneously
<?php $toppings1 = array("Pepperoni", "Cheese", "Anchovies", "Tomatoes"); $toppings2 = array("Ham", "Cheese", "Peppers"); $inttoppings = array_intersect($toppings1, $toppings2); $difftoppings = array_diff($toppings1, $toppings2); $bothtoppings = array_merge($toppings1, $toppings2); $bothtoppings = array_unique($bothtoppings); var_dump($inttoppings); var_dump($difftoppings); var_dump($bothtoppings); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eMQOX
function name:  (null)
number of ops:  31
compiled vars:  !0 = $toppings1, !1 = $toppings2, !2 = $inttoppings, !3 = $difftoppings, !4 = $bothtoppings
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
    4     2        INIT_FCALL                                               'array_intersect'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $7      
          6        ASSIGN                                                   !2, $7
    5     7        INIT_FCALL                                               'array_diff'
          8        SEND_VAR                                                 !0
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $9      
         11        ASSIGN                                                   !3, $9
    6    12        INIT_FCALL                                               'array_merge'
         13        SEND_VAR                                                 !0
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $11     
         16        ASSIGN                                                   !4, $11
    7    17        INIT_FCALL                                               'array_unique'
         18        SEND_VAR                                                 !4
         19        DO_ICALL                                         $13     
         20        ASSIGN                                                   !4, $13
    8    21        INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !2
         23        DO_ICALL                                                 
    9    24        INIT_FCALL                                               'var_dump'
         25        SEND_VAR                                                 !3
         26        DO_ICALL                                                 
   10    27        INIT_FCALL                                               'var_dump'
         28        SEND_VAR                                                 !4
         29        DO_ICALL                                                 
   12    30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.2 ms | 1395 KiB | 23 Q