mirror of
https://github.com/php/php-src.git
synced 2024-09-28 05:16:12 +00:00
22 lines
797 B
Plaintext
22 lines
797 B
Plaintext
|
- Allow NULL for $matches argument (helps when using preg_match only for
|
||
|
match condition) - might not be possible
|
||
|
|
||
|
- http://bugs.php.net/bug.php?id=36975
|
||
|
|
||
|
- I'd love to see a pattern modifer which says "don't fill $matches except
|
||
|
for the overall match and any specific named captures". This would allow
|
||
|
(?: ...) to be avoided in a lot of cases.
|
||
|
|
||
|
This could make for non-trivial speed enhancements with regexes that have
|
||
|
a lot of parens when working on long strings, since you'd not have to
|
||
|
copy them multiple times to the $matches array.
|
||
|
|
||
|
Also, it makes $matches much cleaner after a match where you've named the
|
||
|
captures you're interested in.
|
||
|
|
||
|
(Note that this would not involve the use of PCRE_NO_AUTO_CAPTURE, as
|
||
|
that would change the semantics of backreferences)
|
||
|
|
||
|
|
||
|
|