diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-01-29 11:04:20 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-01-29 11:10:47 +0100 |
commit | 55dbb573226cf98d77e23becfd5148f0ea93d640 (patch) | |
tree | c1eab0423d428f687fba4c386a2c2365a00a94ba | |
parent | 6b89dbcc5bb9ae5e4852e4b8060934e405c5e1a1 (diff) | |
download | php-git-55dbb573226cf98d77e23becfd5148f0ea93d640.tar.gz |
Remove support for custom assert() function
Deprecated in PHP 7.3 as part of
https://wiki.php.net/rfc/deprecations_php_7_3.
-rw-r--r-- | Zend/tests/custom_assert_forbidden.phpt (renamed from Zend/tests/custom_assert_deprecation.phpt) | 2 | ||||
-rw-r--r-- | Zend/zend_compile.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Zend/tests/custom_assert_deprecation.phpt b/Zend/tests/custom_assert_forbidden.phpt index b4e22843dd..492a656f39 100644 --- a/Zend/tests/custom_assert_deprecation.phpt +++ b/Zend/tests/custom_assert_forbidden.phpt @@ -9,4 +9,4 @@ function assert() {} ?> --EXPECTF-- -Deprecated: Defining a custom assert() function is deprecated, as the function has special semantics in %s on line %d +Fatal error: Defining a custom assert() function is not allowed, as the function has special semantics in %s on line %d diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index e6b6d9fc09..cfe03e71f9 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -5740,8 +5740,8 @@ static void zend_begin_func_decl(znode *result, zend_op_array *op_array, zend_as } if (zend_string_equals_literal_ci(unqualified_name, "assert")) { - zend_error(E_DEPRECATED, - "Defining a custom assert() function is deprecated, " + zend_error(E_COMPILE_ERROR, + "Defining a custom assert() function is not allowed, " "as the function has special semantics"); } |