diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2016-07-09 16:19:16 +0200 |
---|---|---|
committer | Julien Pauli <jpauli@php.net> | 2016-07-11 11:20:01 +0200 |
commit | 0c98f51c8429b886dceee6c7ae003f1245727b2e (patch) | |
tree | b48a484f94bd9ba58c74e55788775ef7471a2714 /ext/mbstring/php_mbregex.c | |
parent | cf8c217e8fb825b2667e71bd4c055497e338d5e3 (diff) | |
download | php-git-0c98f51c8429b886dceee6c7ae003f1245727b2e.tar.gz |
Implement RFC "Deprecate mb_ereg_replace eval option"
<https://wiki.php.net/rfc/deprecate_mb_ereg_replace_eval_option> has been
accepted, so we implement it.
Diffstat (limited to 'ext/mbstring/php_mbregex.c')
-rw-r--r-- | ext/mbstring/php_mbregex.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index 5af7eb15c6..b427980430 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -855,6 +855,9 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp syntax = MBREX(regex_default_syntax); } } + if (eval && !is_callable) { + php_error_docref(NULL, E_DEPRECATED, "The 'e' option is deprecated, use mb_ereg_replace_callback instead"); + } if (Z_TYPE_P(arg_pattern_zval) == IS_STRING) { arg_pattern = Z_STRVAL_P(arg_pattern_zval); arg_pattern_len = Z_STRLEN_P(arg_pattern_zval); |