3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = ['foo', 'bar', 'baz', 'foo']; $arr2 = ['foo', 'bar', 'baz', 'bar']; $diff1 = array_diff($arr1, $arr2); $diff2 = array_diff($arr2, $arr1); var_dump(empty($diff1)); var_dump(empty($diff2));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/I0qck
function name:  (null)
number of ops:  21
compiled vars:  !0 = $arr1, !1 = $arr2, !2 = $diff1, !3 = $diff2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    6     2        INIT_FCALL                                               'array_diff'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !2, $6
    7     7        INIT_FCALL                                               'array_diff'
          8        SEND_VAR                                                 !1
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $8      
         11        ASSIGN                                                   !3, $8
    9    12        INIT_FCALL                                               'var_dump'
         13        ISSET_ISEMPTY_CV                                 ~10     !2
         14        SEND_VAL                                                 ~10
         15        DO_ICALL                                                 
   10    16        INIT_FCALL                                               'var_dump'
         17        ISSET_ISEMPTY_CV                                 ~12     !3
         18        SEND_VAL                                                 ~12
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
268.04 ms | 1011 KiB | 15 Q