3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'xxxx xxxx xx xxxx xxx foo xxx xxx xxxxx\nxxxx xx foo xxx xxx xxxxx\nxx xxxxx xxxx xx xxx xx bar xx xxxx\nxxxxxx xx xxxxx x xxxx bar\nxxx xxxxx xx xx foo_sub1 xxx xxxx\nxx foo_sub2 xxxxx xxx x xxxx\nxxx xx foo1_sub1 xxx xxxx\nxxxxx foo1_sub2 xxxxx xxx x xxxx'; if (preg_match_all('~\bfoo(?:_\w+)?\b~', $str, $matches)) { print_r($matches[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/gPjD3
function name:  (null)
number of ops:  12
compiled vars:  !0 = $str, !1 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'xxxx+xxxx+xx+xxxx+xxx+foo+xxx+xxx+xxxxx%5Cnxxxx+xx+foo+xxx+xxx+xxxxx%5Cnxx+xxxxx+xxxx+xx+xxx+xx+bar+xx+xxxx%5Cnxxxxxx+xx+xxxxx+x+xxxx+bar%5Cnxxx+xxxxx+xx+xx+foo_sub1+xxx+xxxx%5Cnxx+foo_sub2+xxxxx+xxx+x+xxxx%5Cnxxx+xx+foo1_sub1+xxx+xxxx%5Cnxxxxx+foo1_sub2+xxxxx+xxx+x+xxxx'
    4     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%7E%5Cbfoo%28%3F%3A_%5Cw%2B%29%3F%5Cb%7E'
          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:
153.49 ms | 1010 KiB | 15 Q