3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = [ 'needle' => 'needle in haystack text', 'Need' => 'another needle', 'fine' => 'refined', 'found' => 'Foundation', '' => 'non-empty haystack', 'missing' => 'not here', 'This is 0 in a haystack!', ]; var_export( array_filter( $array, function($haystack, $needle) { return strpos($haystack, $needle) !== false; }, ARRAY_FILTER_USE_BOTH ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jQ7K4
function name:  (null)
number of ops:  11
compiled vars:  !0 = $array
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   13     1        INIT_FCALL                                                   'var_export'
   14     2        INIT_FCALL                                                   'array_filter'
   15     3        SEND_VAR                                                     !0
   16     4        DECLARE_LAMBDA_FUNCTION                              ~2      [0]
   18     5        SEND_VAL                                                     ~2
   19     6        SEND_VAL                                                     1
   14     7        DO_ICALL                                             $3      
   19     8        SEND_VAR                                                     $3
   13     9        DO_ICALL                                                     
   21    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/jQ7K4
function name:  {closure:/in/jQ7K4:16}
number of ops:  6
compiled vars:  !0 = $haystack, !1 = $needle
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
   17     2        FRAMELESS_ICALL_2                strpos              ~2      !0, !1
          3        TYPE_CHECK                                      1018  ~3      ~2
          4      > RETURN                                                       ~3
   18     5*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.08 ms | 1924 KiB | 15 Q