]> granicus.if.org Git - php/commitdiff
Remove support for custom assert() function
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 29 Jan 2019 10:04:20 +0000 (11:04 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 29 Jan 2019 10:10:47 +0000 (11:10 +0100)
Deprecated in PHP 7.3 as part of
https://wiki.php.net/rfc/deprecations_php_7_3.

Zend/tests/custom_assert_forbidden.phpt [moved from Zend/tests/custom_assert_deprecation.phpt with 53% similarity]
Zend/zend_compile.c

similarity index 53%
rename from Zend/tests/custom_assert_deprecation.phpt
rename to Zend/tests/custom_assert_forbidden.phpt
index b4e22843ddb1ff25aecd60b5dbbaf5b53f887174..492a656f3949ced16f66bf4a0342bd3e9372f884 100644 (file)
@@ -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
index e6b6d9fc09eb01c176e1d592987f65ac28fb2779..cfe03e71f94efa704c1befb3f12aac73ffa42c6f 100644 (file)
@@ -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");
        }