From 39423e425d6caafea3c0b45c2b6ebe4a06a11462 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 21 Jul 2016 15:36:42 +0200 Subject: 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] --- ext/pcre/php_pcre.c | 1 + 1 file changed, 1 insertion(+) (limited to 'ext/pcre/php_pcre.c') 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; -- cgit v1.2.1