3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array =array( "123,456,789"=> "1,1,1", "333"=>"1", "777"=>"1" ); $keys = array_keys($array); $matching_key = preg_grep("/\b333\b/", $keys); $value = $array[current($matching_key)]; var_dump($matching_key);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pmhXq
function name:  (null)
number of ops:  19
compiled vars:  !0 = $array, !1 = $keys, !2 = $matching_key, !3 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        INIT_FCALL                                               'array_keys'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
   11     5        INIT_FCALL                                               'preg_grep'
          6        SEND_VAL                                                 '%2F%5Cb333%5Cb%2F'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $7      
          9        ASSIGN                                                   !2, $7
   13    10        INIT_FCALL                                               'current'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                         $9      
         13        FETCH_DIM_R                                      ~10     !0, $9
         14        ASSIGN                                                   !3, ~10
   15    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.91 ms | 1394 KiB | 21 Q