3v4l.org

run code in 500+ PHP versions simultaneously
<?php $str = 'GuiPrinter.ProcessPrint of 116806 25374 K356 S Black Face.png 229 at 1 table'; $re = '/GuiPrinter\.ProcessPrint of \K.*?\.(?:gif|png|bmp|jpe?g)\b/'; function findMatch($message, $regex) { preg_match($regex, $message, $matches); return array_shift($matches); } $result = findMatch($str, $re); if ($result) { echo "Found: $result"; } else { echo "No match."; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LhHZ9
function name:  (null)
number of ops:  14
compiled vars:  !0 = $str, !1 = $re, !2 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'GuiPrinter.ProcessPrint+of+116806+25374+K356+S+Black+Face.png+229+at+1+table'
    4     1        ASSIGN                                                       !1, '%2FGuiPrinter%5C.ProcessPrint+of+%5CK.%2A%3F%5C.%28%3F%3Agif%7Cpng%7Cbmp%7Cjpe%3Fg%29%5Cb%2F'
   11     2        INIT_FCALL                                                   'findmatch'
          3        SEND_VAR                                                     !0
          4        SEND_VAR                                                     !1
          5        DO_FCALL                                          0  $5      
          6        ASSIGN                                                       !2, $5
   13     7      > JMPZ                                                         !2, ->12
   14     8    >   NOP                                                          
          9        FAST_CONCAT                                          ~7      'Found%3A+', !2
         10        ECHO                                                         ~7
   13    11      > JMP                                                          ->13
   16    12    >   ECHO                                                         'No+match.'
   17    13    > > RETURN                                                       1

Function findmatch:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LhHZ9
function name:  findMatch
number of ops:  12
compiled vars:  !0 = $message, !1 = $regex, !2 = $matches
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
    7     2        INIT_FCALL                                                   'preg_match'
          3        SEND_VAR                                                     !1
          4        SEND_VAR                                                     !0
          5        SEND_REF                                                     !2
          6        DO_ICALL                                                     
    8     7        INIT_FCALL                                                   'array_shift'
          8        SEND_REF                                                     !2
          9        DO_ICALL                                             $4      
         10      > RETURN                                                       $4
    9    11*     > RETURN                                                       null

End of function findmatch

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.73 ms | 2045 KiB | 16 Q