Re: Add support for PCRE marks
| From: | Nikita Popov | Date: | Mon, 17 Mar 2014 21:51:58 +0000 |
| Subject: | Re: Add support for PCRE marks | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-73244@lists.php.net to get a copy of this message | ||
On Fri, Feb 28, 2014 at 9:37 PM, Nikita Popov <nikita.ppv@gmail.com> wrote:
> Hi internals!
>
> I wrote a patch to expose PCRE mark information in PHP, see
> https://github.com/php/php-src/pull/609/files. The last passed
> *MARK will
> be added to the $matches array under key "MARK". If you don't use marks
> everything stays exactly the same.
>
> Does anyone have a problem with exposing it in this way?
>
> In this context, would there be a problem with increasing the minimum
> required PCRE version (for builds against an external library) from 6.6 to
> 8.10 (the current, bundled version is 8.34)? That would avoid adding
> #ifdefs for this code. Is there some particular reason for 6.6 here?
>
I merged this with ifdefs for now (ping me if you have build issues, I
didn't actually test this).
It would still be nice to increase the minimum version number for 5.6,
because allowing prehistoric PCRE versions in a new release makes zero
sense. I recommend at least 8.10 because it both supports marks and - more
relevantly to most users - supports UCP mode, which PHP uses by default (if
available). UCP mode can significantly change the behavior of PCRE with the
/u modifier, as such guaranteeing a minimum version of 8.10 will also
guarantee a somewhat consistent /u behavior.
Nikita