3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.94 ms | 1011 KiB | 15 Q