diff --git a/Zend/tests/custom_assert_deprecation.phpt b/Zend/tests/custom_assert_forbidden.phpt similarity index 53% rename from Zend/tests/custom_assert_deprecation.phpt rename to Zend/tests/custom_assert_forbidden.phpt index b4e22843ddb..492a656f394 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 e6b6d9fc09e..cfe03e71f94 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"); }