Web lists-archives.com

Re: [PHP] Catch line indetation




On 29.10.2016 at 05:17, German Geek wrote:

> Note also, that the regex here might be compiled every time, in which case
> regexes are the clear winner. I think PHP might cache the compiled regex
> though.

Yes, by default up to 4096 compiled regex patterns are cached, see
<https://github.com/php/php-src/blob/PHP-7.0.13/ext/pcre/php_pcre.c#L45>ff.

With regard to the performance, I presume that prec.jit makes a
difference (depending on the complexity of the pattern and the subject
length).

-- 
Christoph M. Becker


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php