[TASK] Remove thecodingmachine/safe dependency (part 1) - #1612
Conversation
Co-authored-by: Oliver Klee <github@oliverklee.de>
thecodingmachine/safe dependency (part 1)thecodingmachine/safe dependency (part 1)
Actually there is backtracking, or at least the storage of backtracking information. The engine is simple and does not know what it might be matching next. So when matching the optional vendor-prefix, it needs to be able to rewind in case the following part will match without it but not with. We can see that's not possible, but it can't. So it will build up a rewind stack. If presented with something like Use of the possessive quantifier will mitigate this. I think that's beyond the scope of these PRs, so have added #1614. The library as it is should bail out somehow reasonably in such unrealistic situations, as well as it did before the introduction of 'Safe', and at least there is now an |
As discussed here: #1484 (comment)
preg_matchcan returnfalseif:uflag is used and the subject or pattern aren't valid UTF-8This
preg_matchcan't fail because:$matchis always a fixed value)uflag