3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = [ ['text' => 'I like Apples', 'id' => '102923'], ['text' => 'I like Apples and Bread', 'id' =>'283923'], ['text' => 'I like Apples, Bread, and Cheese', 'id' => '3384823'], ['text' => 'I like Green Eggs and Ham', 'id' =>'4473873'] ]; $search = 'Bread'; var_export( array_filter($array, fn($subarray) => str_contains($subarray['text'], $search)) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ntMfF
function name:  (null)
number of ops:  12
compiled vars:  !0 = $array, !1 = $search
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   10     1        ASSIGN                                                       !1, 'Bread'
   11     2        INIT_FCALL                                                   'var_export'
   12     3        INIT_FCALL                                                   'array_filter'
          4        SEND_VAR                                                     !0
          5        DECLARE_LAMBDA_FUNCTION                              ~4      [0]
          6        BIND_LEXICAL                                                 ~4, !1
          7        SEND_VAL                                                     ~4
          8        DO_ICALL                                             $5      
          9        SEND_VAR                                                     $5
   11    10        DO_ICALL                                                     
   13    11      > 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/ntMfF
function name:  {closure:/in/ntMfF:12}
number of ops:  6
compiled vars:  !0 = $subarray, !1 = $search
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E >   RECV                                                 !0      
          1        BIND_STATIC                                                  !1
          2        FETCH_DIM_R                                          ~2      !0, 'text'
          3        FRAMELESS_ICALL_2                str_contains        ~3      ~2, !1
          4      > RETURN                                                       ~3
          5*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
153.76 ms | 2216 KiB | 15 Q