3v4l.org

run code in 300+ PHP versions simultaneously
<?php $items = [ 'a' => [], 'b' => ['id' => 'B'], 'c' => ['id' => 'C'], 'd' => [], 'e' => ['id' => 'E'], ]; var_export( array_filter( array_combine( array_keys($items), array_column($items, 'id'))));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/im2gZ
function name:  (null)
number of ops:  19
compiled vars:  !0 = $items
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        INIT_FCALL                                               'var_export'
   11     2        INIT_FCALL                                               'array_filter'
   12     3        INIT_FCALL                                               'array_combine'
   13     4        INIT_FCALL                                               'array_keys'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $2      
          7        SEND_VAR                                                 $2
   14     8        INIT_FCALL                                               'array_column'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 'id'
         11        DO_ICALL                                         $3      
         12        SEND_VAR                                                 $3
   12    13        DO_ICALL                                         $4      
   14    14        SEND_VAR                                                 $4
   11    15        DO_ICALL                                         $5      
   14    16        SEND_VAR                                                 $5
   10    17        DO_ICALL                                                 
   14    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.13 ms | 1070 KiB | 18 Q