3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = ['1', '2']; $y = ['2', '1']; $z = ['1', '2', '4']; $n = [1, 2]; echo array_diff($x, $y) === array_diff($y, $x) ? 'y1' : 'n1'; echo array_diff($x) === array_diff($z) ? 'y2' : 'n2'; echo array_diff($z); echo array_diff($x) === array_diff($n) ? 'y3' : 'n3';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 28
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 42, Position 2 = 44
Branch analysis from position: 42
1 jumps found. (Code = 42) Position 1 = 45
Branch analysis from position: 45
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 42, Position 2 = 44
Branch analysis from position: 42
Branch analysis from position: 44
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 28
Branch analysis from position: 26
Branch analysis from position: 28
filename:       /in/t6duF
function name:  (null)
number of ops:  47
compiled vars:  !0 = $x, !1 = $y, !2 = $z, !3 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    5     2        ASSIGN                                                   !2, <array>
    6     3        ASSIGN                                                   !3, <array>
    8     4        INIT_FCALL                                               'array_diff'
          5        SEND_VAR                                                 !0
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $8      
          8        INIT_FCALL                                               'array_diff'
          9        SEND_VAR                                                 !1
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $9      
         12        IS_IDENTICAL                                             $8, $9
         13      > JMPZ                                                     ~10, ->16
         14    >   QM_ASSIGN                                        ~11     'y1'
         15      > JMP                                                      ->17
         16    >   QM_ASSIGN                                        ~11     'n1'
         17    >   ECHO                                                     ~11
    9    18        INIT_FCALL                                               'array_diff'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                         $12     
         21        INIT_FCALL                                               'array_diff'
         22        SEND_VAR                                                 !2
         23        DO_ICALL                                         $13     
         24        IS_IDENTICAL                                             $12, $13
         25      > JMPZ                                                     ~14, ->28
         26    >   QM_ASSIGN                                        ~15     'y2'
         27      > JMP                                                      ->29
         28    >   QM_ASSIGN                                        ~15     'n2'
         29    >   ECHO                                                     ~15
   10    30        INIT_FCALL                                               'array_diff'
         31        SEND_VAR                                                 !2
         32        DO_ICALL                                         $16     
         33        ECHO                                                     $16
   11    34        INIT_FCALL                                               'array_diff'
         35        SEND_VAR                                                 !0
         36        DO_ICALL                                         $17     
         37        INIT_FCALL                                               'array_diff'
         38        SEND_VAR                                                 !3
         39        DO_ICALL                                         $18     
         40        IS_IDENTICAL                                             $17, $18
         41      > JMPZ                                                     ~19, ->44
         42    >   QM_ASSIGN                                        ~20     'y3'
         43      > JMP                                                      ->45
         44    >   QM_ASSIGN                                        ~20     'n3'
         45    >   ECHO                                                     ~20
         46      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150 ms | 1400 KiB | 15 Q