3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array( 0 => "apple", "b" => "banana", 3 => "cow", "wrench" => "duck" ); $b = array_intersect_key($a, array_flip(array_filter(array_keys($a), 'is_string'))); var_dump($b);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aj9FD
function name:  (null)
number of ops:  20
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    9     1        INIT_FCALL                                               'array_intersect_key'
          2        SEND_VAR                                                 !0
          3        INIT_FCALL                                               'array_flip'
          4        INIT_FCALL                                               'array_filter'
          5        INIT_FCALL                                               'array_keys'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $3      
          8        SEND_VAR                                                 $3
          9        SEND_VAL                                                 'is_string'
         10        DO_ICALL                                         $4      
         11        SEND_VAR                                                 $4
         12        DO_ICALL                                         $5      
         13        SEND_VAR                                                 $5
         14        DO_ICALL                                         $6      
         15        ASSIGN                                                   !1, $6
   10    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.09 ms | 1398 KiB | 23 Q