3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = [ 'mark@test.by.com'=> "Mark Mian lv", 'jhon@test.lv.com'=> "John jack lv", 'logon@test.en.com'=> "Bob Logon", 'Stela@test.es.com'=> "Stela Josh", 'json@test.es.com'=> "Json Josh", 'bobby@test.lv.com'=> "Bob Mark" ]; $needle = 'b'; var_export( array_filter( $array, fn($v, $k) => str_contains($v, $needle) || str_contains($k, $needle), ARRAY_FILTER_USE_BOTH ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uimRU
function name:  (null)
number of ops:  13
compiled vars:  !0 = $array, !1 = $needle
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   12     1        ASSIGN                                                   !1, 'b'
   14     2        INIT_FCALL                                               'var_export'
   15     3        INIT_FCALL                                               'array_filter'
   16     4        SEND_VAR                                                 !0
   17     5        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
          6        BIND_LEXICAL                                             ~4, !1
          7        SEND_VAL                                                 ~4
   18     8        SEND_VAL                                                 1
   15     9        DO_ICALL                                         $5      
   18    10        SEND_VAR                                                 $5
   14    11        DO_ICALL                                                 
   20    12      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/uimRU
function name:  {closure}
number of ops:  15
compiled vars:  !0 = $v, !1 = $k, !2 = $needle
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
          3        INIT_FCALL                                               'str_contains'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !2
          6        DO_ICALL                                         $3      
          7      > JMPNZ_EX                                         ~4      $3, ->13
          8    >   INIT_FCALL                                               'str_contains'
          9        SEND_VAR                                                 !1
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $5      
         12        BOOL                                             ~4      $5
         13    > > RETURN                                                   ~4
         14*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.88 ms | 1890 KiB | 14 Q