3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tag = "MU"; $string = 'D109 MU, worked from home today Walked the dog, later took the kids to swimming. D110 MU. Went to the gym in the evening for the 9th time this month.'; var_export(preg_match_all("~D\K\d+(?= $tag)~", $string, $out) ? $out[0] : 'fail');
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aperC
function name:  (null)
number of ops:  19
compiled vars:  !0 = $tag, !1 = $string, !2 = $out
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'MU'
    3     1        ASSIGN                                                   !1, 'D109+MU%2C+worked+from+home+today%0AWalked+the+dog%2C+later+took+the+kids+to+swimming.+D110+MU.+Went+to+the+gym+in+the+++++evening+for+the+9th+time+this+month.'
    6     2        INIT_FCALL                                               'var_export'
          3        INIT_FCALL                                               'preg_match_all'
          4        ROPE_INIT                                     3  ~6      '%7ED%5CK%5Cd%2B%28%3F%3D+'
          5        ROPE_ADD                                      1  ~6      ~6, !0
          6        ROPE_END                                      2  ~5      ~6, '%29%7E'
          7        SEND_VAL                                                 ~5
          8        SEND_VAR                                                 !1
          9        SEND_REF                                                 !2
         10        DO_ICALL                                         $8      
         11      > JMPZ                                                     $8, ->15
         12    >   FETCH_DIM_R                                      ~9      !2, 0
         13        QM_ASSIGN                                        ~10     ~9
         14      > JMP                                                      ->16
         15    >   QM_ASSIGN                                        ~10     'fail'
         16    >   SEND_VAL                                                 ~10
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.75 ms | 1437 KiB | 15 Q