Skip to content

Deprecate the parameter of get_defined_functions() #19425

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

Merged
merged 1 commit into from
Aug 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions Zend/tests/bug79668.phpt

This file was deleted.

6 changes: 3 additions & 3 deletions Zend/zend_builtin_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -1483,15 +1483,15 @@ ZEND_FUNCTION(get_defined_functions)
zval internal, user;
zend_string *key;
zend_function *func;
bool exclude_disabled = 1;
bool exclude_disabled = true;

if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &exclude_disabled) == FAILURE) {
RETURN_THROWS();
}

if (exclude_disabled == 0) {
if (ZEND_NUM_ARGS() == 1) {
zend_error(E_DEPRECATED,
"get_defined_functions(): Setting $exclude_disabled to false has no effect");
"get_defined_functions(): The $exclude_disabled parameter has no effect since PHP 8.0");
}

array_init(&internal);
Expand Down
4 changes: 3 additions & 1 deletion tests/basic/bug31875.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ var_dump(in_array($disabled_function, $functions['internal']));
--EXPECTF--
bool(false)

Deprecated: get_defined_functions(): Setting $exclude_disabled to false has no effect in %s on line %d
Deprecated: get_defined_functions(): The $exclude_disabled parameter has no effect since PHP 8.0 in %s on line %d
bool(false)

Deprecated: get_defined_functions(): The $exclude_disabled parameter has no effect since PHP 8.0 in %s on line %d
bool(false)