summaryrefslogtreecommitdiff
path: root/ext/pcre/php_pcre.c
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2016-07-21 15:36:42 +0200
committerStanislav Malyshev <stas@php.net>2016-09-05 00:30:48 -0700
commit39423e425d6caafea3c0b45c2b6ebe4a06a11462 (patch)
tree9edf2e0095d589ca61521ae1af2f734c19ebdbb5 /ext/pcre/php_pcre.c
parentcee363d6093abb25a3b0a0f448f8928c1f819294 (diff)
downloadphp-git-39423e425d6caafea3c0b45c2b6ebe4a06a11462.tar.gz
Implement #47456: Missing PCRE option 'J'
While it is possible to force the same behavior by setting the internal option (?J), having a dedicated modifier appears to be useful. After all, J is even listed on the "Pattern Modifiers" man page[1], but the description referrs to (?J). [1] <http://php.net/manual/en/reference.pcre.pattern.modifiers.php>
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r--ext/pcre/php_pcre.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index ddc5d764f9..21ea01d92c 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -396,6 +396,7 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(char *regex, int regex_le
coptions |= PCRE_UCP;
#endif
break;
+ case 'J': coptions |= PCRE_DUPNAMES; break;
/* Custom preg options */
case 'e': poptions |= PREG_REPLACE_EVAL; break;