From be202d3d352e82c5d6825772c2709894f2bc4a21 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 4 Mar 2012 13:39:12 +0000 Subject: Deprecate /e modifier See https://wiki.php.net/rfc/remove_preg_replace_eval_modifier. --- ext/pcre/php_pcre.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ext/pcre/php_pcre.c') 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) { -- cgit v1.2.1