I've put together an extension which wraps RE2 - an alternative to
PCRE which can be much faster and be constrained to memory limits
Generally it can be useful. Can be PCRE used in mode without backtracking?
If yes, I cannot see many benefits over PCRE.
Small comment when I quick look the header file:
Why these two are necessary? Just one isn't enough?
PHP_METHOD(RE2_Options, getOneLine);
PHP_METHOD(RE2_Options, getOneLine);
PHP_METHOD(RE2_Options, setOneLine);
PHP_METHOD(RE2_Options, setOneLine);
And small notice about error handling - btw how your API has handled errors.
I have very bad experience with the error handling in PCRE.
See
http://translate.google.com/translate?u=http%3A%2F%2Fphpfashion.com%2Fzradne-regularni-vyrazy-v-php&ie=UTF8&sl=cs&tl=en
(original language is Czech)
Don't make silly API for errors and return values as PCRE has.
Maybe you can drop functional API and use only OO API with Exception.
Miroslav Kubelik