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.
This commit is contained in:
Christoph M. Becker 2016-07-09 16:19:16 +02:00 committed by Julien Pauli
parent cf8c217e8f
commit 0c98f51c84
5 changed files with 12 additions and 1 deletions

View file

@ -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);