3v4l.org

run code in 300+ PHP versions simultaneously
<?php $word = 'Sing'; $urls = ['http://I_like_to_sing.mp3', 'http://Another_song.mp3']; $regex = "/https?:\/\/(?=.*$word).+\.mp3/i"; print_r(array_filter($urls, function ($v) use ($regex) { return preg_match($regex, $v); }));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MpRbO
function name:  (null)
number of ops:  16
compiled vars:  !0 = $word, !1 = $urls, !2 = $regex
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Sing'
    4     1        ASSIGN                                                   !1, <array>
    5     2        ROPE_INIT                                     3  ~6      '%2Fhttps%3F%3A%5C%2F%5C%2F%28%3F%3D.%2A'
          3        ROPE_ADD                                      1  ~6      ~6, !0
          4        ROPE_END                                      2  ~5      ~6, '%29.%2B%5C.mp3%2Fi'
          5        ASSIGN                                                   !2, ~5
    6     6        INIT_FCALL                                               'print_r'
          7        INIT_FCALL                                               'array_filter'
          8        SEND_VAR                                                 !1
          9        DECLARE_LAMBDA_FUNCTION                          ~9      [0]
         10        BIND_LEXICAL                                             ~9, !2
         11        SEND_VAL                                                 ~9
         12        DO_ICALL                                         $10     
         13        SEND_VAR                                                 $10
         14        DO_ICALL                                                 
         15      > 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/MpRbO
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $v, !1 = $regex
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        INIT_FCALL                                               'preg_match'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6      > RETURN                                                   $2
          7*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.88 ms | 1004 KiB | 16 Q