3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array("a" => "green", "b" => "brown", "c" => "blue"); $array2 = array("a" => "green", "c" => "blue2", "d" => "cyan"); $array1 = array_intersect_key($array1, $array2); print_r($array1); $array2 = array_intersect_key($array2, $array1); print_r($array2); $diff = array_diff_assoc($array1, $array2); print_r($diff);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s58T0
function name:  (null)
number of ops:  27
compiled vars:  !0 = $array1, !1 = $array2, !2 = $diff
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_key'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !0, $5
    5     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
    6    10        INIT_FCALL                                               'array_intersect_key'
         11        SEND_VAR                                                 !1
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $8      
         14        ASSIGN                                                   !1, $8
    7    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
    8    18        INIT_FCALL                                               'array_diff_assoc'
         19        SEND_VAR                                                 !0
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                         $11     
         22        ASSIGN                                                   !2, $11
    9    23        INIT_FCALL                                               'print_r'
         24        SEND_VAR                                                 !2
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.5 ms | 1395 KiB | 19 Q