summaryrefslogtreecommitdiff
path: root/ext/pcre/php_pcre.c
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2012-03-04 13:39:12 +0000
committerNikita Popov <nikic@php.net>2012-03-04 13:39:12 +0000
commitbe202d3d352e82c5d6825772c2709894f2bc4a21 (patch)
tree92d1e048469941c596dc686d7775708cea31dfb8 /ext/pcre/php_pcre.c
parent67db5de6b215a20683da45a4d45ee715b836832f (diff)
downloadphp-git-be202d3d352e82c5d6825772c2709894f2bc4a21.tar.gz
Deprecate /e modifier
See https://wiki.php.net/rfc/remove_preg_replace_eval_modifier.
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r--ext/pcre/php_pcre.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index c9d707280c..6b0a41fbed 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -1019,6 +1019,10 @@ PHPAPI char *php_pcre_replace_impl(pcre_cache_entry *pce, char *subject, int sub
replace_end = replace + replace_len;
}
+ if (eval) {
+ php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "The /e modifier is deprecated, use preg_replace_callback instead");
+ }
+
/* Calculate the size of the offsets array, and allocate memory for it. */
rc = pcre_fullinfo(pce->re, extra, PCRE_INFO_CAPTURECOUNT, &num_subpats);
if (rc < 0) {