3v4l.org

run code in 300+ PHP versions simultaneously
<?php $b = ['1' => 1, 'z' => 1]; $a = ['x' => 1, 'z' => 2]; if (count(array_diff(array_merge($a, $b), array_intersect($a, $b))) === 0) { echo 'the same'; } else { echo 'not the same'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9uQuZ
function name:  (null)
number of ops:  21
compiled vars:  !0 = $b, !1 = $a
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        INIT_FCALL                                               'array_merge'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        SEND_VAR                                                 $4
          8        INIT_FCALL                                               'array_intersect'
          9        SEND_VAR                                                 !1
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $5      
         12        SEND_VAR                                                 $5
         13        DO_ICALL                                         $6      
         14        COUNT                                            ~7      $6
         15        IS_IDENTICAL                                             ~7, 0
         16      > JMPZ                                                     ~8, ->19
    7    17    >   ECHO                                                     'the+same'
         18      > JMP                                                      ->20
    9    19    >   ECHO                                                     'not+the+same'
   10    20    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.92 ms | 1395 KiB | 19 Q