3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Get the values "a", "b" from $arr = array('a' => 'foo', 'b' => 'bar', c => 'car'); var_dump(array_intersect_key($arr, array_flip(array('a', 'b')))); // returns array('array('a' => 'foo', 'b' => 'bar')
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cCqep
function name:  (null)
number of ops:  16
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_ARRAY                                       ~1      'foo', 'a'
          1        ADD_ARRAY_ELEMENT                                ~1      'bar', 'b'
          2        FETCH_CONSTANT                                   ~2      'c'
          3        ADD_ARRAY_ELEMENT                                ~1      'car', ~2
          4        ASSIGN                                                   !0, ~1
    7     5        INIT_FCALL                                               'var_dump'
          6        INIT_FCALL                                               'array_intersect_key'
          7        SEND_VAR                                                 !0
          8        INIT_FCALL                                               'array_flip'
          9        SEND_VAL                                                 <array>
         10        DO_ICALL                                         $4      
         11        SEND_VAR                                                 $4
         12        DO_ICALL                                         $5      
         13        SEND_VAR                                                 $5
         14        DO_ICALL                                                 
    8    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.92 ms | 1394 KiB | 19 Q