3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = Array ( 0 => "0,1", 1 => "0,0", 2 => "0,2", 3 => "0,3", 4 => "10,2" ); $b = Array ( 0 => "0,1", 1 => "0,0" ); $intersect = array_intersect($a, $b); $keys = array_keys($intersect); If($keys == array_keys($b)){ Echo "they match"; }else{ Echo "don't match"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iiNmd
function name:  (null)
number of ops:  20
compiled vars:  !0 = $a, !1 = $b, !2 = $intersect, !3 = $keys
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   12     1        ASSIGN                                                   !1, <array>
   18     2        INIT_FCALL                                               'array_intersect'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !2, $6
   19     7        INIT_FCALL                                               'array_keys'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                         $8      
         10        ASSIGN                                                   !3, $8
   21    11        INIT_FCALL                                               'array_keys'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $10     
         14        IS_EQUAL                                                 !3, $10
         15      > JMPZ                                                     ~11, ->18
   22    16    >   ECHO                                                     'they+match'
   21    17      > JMP                                                      ->19
   24    18    >   ECHO                                                     'don%27t+match'
   25    19    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
133.01 ms | 1000 KiB | 15 Q