3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'http://example.com/site.xml', 'http://example.com/my_custom_links_part1.xml', 'http://example.com/my_custom_links_part2.xml', 'http://example.com/my_custom_links_part3.xml', 'http://example.com/my_some_other_custom_links_part1.xml', ]; $needle = 'my_custom_links'; var_export( array_filter( $array, fn($haystack) => str_contains($haystack, $needle) ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Xf4HJ
function name:  (null)
number of ops:  12
compiled vars:  !0 = $array, !1 = $needle
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        ASSIGN                                                   !1, 'my_custom_links'
   11     2        INIT_FCALL                                               'var_export'
   12     3        INIT_FCALL                                               'array_filter'
   13     4        SEND_VAR                                                 !0
   14     5        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
          6        BIND_LEXICAL                                             ~4, !1
   15     7        SEND_VAL                                                 ~4
   12     8        DO_ICALL                                         $5      
   15     9        SEND_VAR                                                 $5
   11    10        DO_ICALL                                                 
   16    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/Xf4HJ
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $haystack, !1 = $needle
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        INIT_FCALL                                               'str_contains'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $2      
          6      > RETURN                                                   $2
   15     7*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.28 ms | 1438 KiB | 16 Q