3v4l.org

run code in 300+ 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}
number of ops:  9
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        INIT_FCALL                                               'strpos'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $2      
          6        TYPE_CHECK                                  1018  ~3      $2
          7      > RETURN                                                   ~3
   18     8*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.68 ms | 1006 KiB | 16 Q