3v4l.org

run code in 500+ PHP versions simultaneously
<?php $pattern = '/\bПривіт\W+(?:\w+\W+){0,6}?світу\b/ui'; $sample = 'Привіт, світу!'; echo (int)preg_match( $pattern, $sample, $matches).PHP_EOL; print_r($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7HurJ
function name:  (null)
number of ops:  14
compiled vars:  !0 = $pattern, !1 = $sample, !2 = $matches
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, '%2F%5Cb%D0%9F%D1%80%D0%B8%D0%B2%D1%96%D1%82%5CW%2B%28%3F%3A%5Cw%2B%5CW%2B%29%7B0%2C6%7D%3F%D1%81%D0%B2%D1%96%D1%82%D1%83%5Cb%2Fui'
    3     1        ASSIGN                                                       !1, '%D0%9F%D1%80%D0%B8%D0%B2%D1%96%D1%82%2C+%D1%81%D0%B2%D1%96%D1%82%D1%83%21'
    4     2        INIT_FCALL                                                   'preg_match'
          3        SEND_VAR                                                     !0
          4        SEND_VAR                                                     !1
          5        SEND_REF                                                     !2
          6        DO_ICALL                                             $5      
          7        CAST                                              4  ~6      $5
          8        CONCAT                                               ~7      ~6, '%0A'
          9        ECHO                                                         ~7
    5    10        INIT_FCALL                                                   'print_r'
         11        SEND_VAR                                                     !2
         12        DO_ICALL                                                     
         13      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
174.79 ms | 3251 KiB | 15 Q