3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = 'Me, my dog and “myself“ are going on a vacation. Irene and myself are broke. Myself is here :P John and myself!'; if (preg_match_all('/(?:\S+\s+){0,2}\p{P}?myself\p{P}?(?:\s+\S+){0,2}/u', $text, $result)) { print_r($result[0]); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/A2fiB
function name:  (null)
number of ops:  12
compiled vars:  !0 = $text, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Me%2C+my+dog+and+%E2%80%9Cmyself%E2%80%9C+are+going+on+a+vacation.+Irene+and+myself+are+broke.+Myself+is+here+%3AP+John+and+myself%21'
    4     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F%28%3F%3A%5CS%2B%5Cs%2B%29%7B0%2C2%7D%5Cp%7BP%7D%3Fmyself%5Cp%7BP%7D%3F%28%3F%3A%5Cs%2B%5CS%2B%29%7B0%2C2%7D%2Fu'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                         $3      
          6      > JMPZ                                                     $3, ->11
    5     7    >   INIT_FCALL                                               'print_r'
          8        FETCH_DIM_R                                      ~4      !1, 0
          9        SEND_VAL                                                 ~4
         10        DO_ICALL                                                 
    6    11    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.64 ms | 1005 KiB | 15 Q