New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecations for PHP 7.3 #3366

merged 6 commits into from Jul 21, 2018

Deprecate defining a free-standing assert() function

  • Loading branch information...
nikic committed Jul 4, 2018
commit 5c4047b3396818e51bc95878cd45bcd3ff6d357b
@@ -0,0 +1,12 @@
Defining a free-standing assert() function is deprecated
namespace FooBar;
function assert() {}
Deprecated: Defining a custom assert() function is deprecated, as the function has special semantics in %s on line %d
Copy path View file
@@ -5981,6 +5981,12 @@ static void zend_begin_func_decl(znode *result, zend_op_array *op_array, zend_as
zend_error(E_DEPRECATED, "__autoload() is deprecated, use spl_autoload_register() instead");
if (zend_string_equals_literal_ci(unqualified_name, "assert")) {
"Defining a custom assert() function is deprecated, "
"as the function has special semantics");
key = zend_build_runtime_definition_key(lcname, decl->lex_pos);
zend_hash_update_ptr(CG(function_table), key, op_array);
zend_register_seen_symbol(lcname, ZEND_SYMBOL_FUNCTION);
ProTip! Use n and p to navigate between commits in a pull request.