3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fruits_arr = [ ['id' => 213, 'fruit' => 'banana'], ['id' => 438, 'fruit' => 'apple'], ['id' => 154, 'fruit' => 'peach'] ]; $ids_arr = [213, 154]; var_export(array_intersect_key(array_column($fruits_arr, null, "id"), array_flip($ids_arr)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VsXt5
function name:  (null)
number of ops:  18
compiled vars:  !0 = $fruits_arr, !1 = $ids_arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    7     1        ASSIGN                                                   !1, <array>
    9     2        INIT_FCALL                                               'var_export'
          3        INIT_FCALL                                               'array_intersect_key'
          4        INIT_FCALL                                               'array_column'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 null
          7        SEND_VAL                                                 'id'
          8        DO_ICALL                                         $4      
          9        SEND_VAR                                                 $4
         10        INIT_FCALL                                               'array_flip'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $5      
         13        SEND_VAR                                                 $5
         14        DO_ICALL                                         $6      
         15        SEND_VAR                                                 $6
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.07 ms | 1394 KiB | 21 Q