Skip to content

Commit 55dbb57

Browse files
committed
Remove support for custom assert() function
Deprecated in PHP 7.3 as part of https://wiki.php.net/rfc/deprecations_php_7_3.
1 parent 6b89dbc commit 55dbb57

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Zend/tests/custom_assert_deprecation.phpt renamed to Zend/tests/custom_assert_forbidden.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ function assert() {}
99

1010
?>
1111
--EXPECTF--
12-
Deprecated: Defining a custom assert() function is deprecated, as the function has special semantics in %s on line %d
12+
Fatal error: Defining a custom assert() function is not allowed, as the function has special semantics in %s on line %d

Zend/zend_compile.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5740,8 +5740,8 @@ static void zend_begin_func_decl(znode *result, zend_op_array *op_array, zend_as
57405740
}
57415741

57425742
if (zend_string_equals_literal_ci(unqualified_name, "assert")) {
5743-
zend_error(E_DEPRECATED,
5744-
"Defining a custom assert() function is deprecated, "
5743+
zend_error(E_COMPILE_ERROR,
5744+
"Defining a custom assert() function is not allowed, "
57455745
"as the function has special semantics");
57465746
}
57475747

0 commit comments

Comments
 (0)