3v4l.org

run code in 300+ PHP versions simultaneously
<?php $required = ['k1', 'k2']; $data = [ 'k1' => 'v1', ]; $required == array_intersect($required, array_keys($data)); var_dump($required);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Afmqq
function name:  (null)
number of ops:  15
compiled vars:  !0 = $required, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    8     2        INIT_FCALL                                               'array_intersect'
          3        SEND_VAR                                                 !0
          4        INIT_FCALL                                               'array_keys'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                         $5      
          9        IS_EQUAL                                         ~6      !0, $5
         10        FREE                                                     ~6
   10    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.42 ms | 1385 KiB | 19 Q