3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ 'y' => 35, 'x' => 51, 'c_3' => 4, 'c_1' => 54, 'c_6' => 53, 'c_9' => 52, 'z' => 4, ]; var_export( array_filter( $arr, function($v) use($arr) { return preg_match( '#c_\d#', array_search($v, $arr) ); } ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gvQh2
function name:  (null)
number of ops:  11
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   14     1        INIT_FCALL                                               'var_export'
   15     2        INIT_FCALL                                               'array_filter'
   16     3        SEND_VAR                                                 !0
   17     4        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
          5        BIND_LEXICAL                                             ~2, !0
   22     6        SEND_VAL                                                 ~2
   15     7        DO_ICALL                                         $3      
   22     8        SEND_VAR                                                 $3
   14     9        DO_ICALL                                                 
   24    10      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gvQh2
function name:  {closure}
number of ops:  12
compiled vars:  !0 = $v, !1 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
   18     2        INIT_FCALL                                               'preg_match'
   19     3        SEND_VAL                                                 '%23c_%5Cd%23'
   20     4        INIT_FCALL                                               'array_search'
          5        SEND_VAR                                                 !0
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
   18     9        DO_ICALL                                         $3      
   20    10      > RETURN                                                   $3
   22    11*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.19 ms | 1016 KiB | 17 Q