3v4l.org

run code in 500+ PHP versions simultaneously
<?php $re = '/\bdiscount\h[^\r\n€]*\K€\d{1,2}(?:,\d{1,2})?\b/'; $str = 'discount of €50,20 on these items € This item on sale now for €30,20'; if (preg_match($re, $str, $matches)) { echo($matches[0]); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/uZngT
function name:  (null)
number of ops:  11
compiled vars:  !0 = $re, !1 = $str, !2 = $matches
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%2F%5Cbdiscount%5Ch%5B%5E%5Cr%5Cn%E2%82%AC%5D%2A%5CK%E2%82%AC%5Cd%7B1%2C2%7D%28%3F%3A%2C%5Cd%7B1%2C2%7D%29%3F%5Cb%2F'
    4     1        ASSIGN                                                       !1, 'discount+of+%E2%82%AC50%2C20+on+these+items+%E2%82%AC%0AThis+item+on+sale+now+for+%E2%82%AC30%2C20'
    7     2        INIT_FCALL                                                   'preg_match'
          3        SEND_VAR                                                     !0
          4        SEND_VAR                                                     !1
          5        SEND_REF                                                     !2
          6        DO_ICALL                                             $5      
          7      > JMPZ                                                         $5, ->10
    8     8    >   FETCH_DIM_R                                          ~6      !2, 0
          9        ECHO                                                         ~6
    9    10    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
175.39 ms | 2229 KiB | 14 Q