3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = array( array ( 'id' => 10003, 'avs_id' => 'a_b_c_3248' ), array ( 'id' => 10003, 'avs_id' => 'd_e_f_3248' ) ); $src = 'a_b_c'; $result = array_filter ( $array, function( $row ) use( $src ) { return (strpos( $row['avs_id'], $src ) !== False); } ); print_r($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0vuEi
function name:  (null)
number of ops:  13
compiled vars:  !0 = $array, !1 = $src, !2 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   17     1        ASSIGN                                                       !1, 'a_b_c'
   19     2        INIT_FCALL                                                   'array_filter'
   21     3        SEND_VAR                                                     !0
   22     4        DECLARE_LAMBDA_FUNCTION                              ~5      [0]
          5        BIND_LEXICAL                                                 ~5, !1
   25     6        SEND_VAL                                                     ~5
   19     7        DO_ICALL                                             $6      
          8        ASSIGN                                                       !2, $6
   28     9        INIT_FCALL                                                   'print_r'
         10        SEND_VAR                                                     !2
         11        DO_ICALL                                                     
         12      > 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/0vuEi
function name:  {closure:/in/0vuEi:22}
number of ops:  7
compiled vars:  !0 = $row, !1 = $src
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   22     0  E >   RECV                                                 !0      
          1        BIND_STATIC                                                  !1
   24     2        FETCH_DIM_R                                          ~2      !0, 'avs_id'
          3        FRAMELESS_ICALL_2                strpos              ~3      ~2, !1
          4        TYPE_CHECK                                      1018  ~4      ~3
          5      > RETURN                                                       ~4
   25     6*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.62 ms | 1728 KiB | 15 Q