diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 49526330cff1..f734b91a76b3 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -723,7 +723,9 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache_ex(zend_string *regex, bo /* PCRE specific options */ case 'A': coptions |= PCRE2_ANCHORED; break; case 'D': coptions |= PCRE2_DOLLAR_ENDONLY;break; +#ifdef PCRE2_EXTRA_CASELESS_RESTRICT case 'r': eoptions |= PCRE2_EXTRA_CASELESS_RESTRICT; break; +#endif case 'S': /* Pass. */ break; case 'X': /* Pass. */ break; case 'U': coptions |= PCRE2_UNGREEDY; break; diff --git a/ext/pcre/tests/preg_match_caseless_restrict.phpt b/ext/pcre/tests/preg_match_caseless_restrict.phpt index 8238e286b1cf..3a0d063e8153 100644 --- a/ext/pcre/tests/preg_match_caseless_restrict.phpt +++ b/ext/pcre/tests/preg_match_caseless_restrict.phpt @@ -1,5 +1,11 @@ --TEST-- testing /r modifier in preg_* functions +--SKIPIF-- + --FILE--