Skip to content

Commit c657293

Browse files
committed
Deprecate $exclude_disabled=false
1 parent f5bb75a commit c657293

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Zend/zend_builtin_functions.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1421,7 +1421,10 @@ ZEND_FUNCTION(get_defined_functions)
14211421
RETURN_THROWS();
14221422
}
14231423

1424-
/* exclude_disabled = 0 is ignored. */
1424+
if (exclude_disabled == 0) {
1425+
zend_error(E_DEPRECATED,
1426+
"get_defined_functions(): Setting $exclude_disabled to false has no effect");
1427+
}
14251428

14261429
array_init(&internal);
14271430
array_init(&user);

tests/basic/bug31875.phpt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ var_dump(in_array($disabled_function, $functions['internal']));
1919
$functions = get_defined_functions(true);
2020
var_dump(in_array($disabled_function, $functions['internal']));
2121
?>
22-
--EXPECT--
22+
--EXPECTF--
2323
bool(false)
24+
25+
Deprecated: get_defined_functions(): Setting $exclude_disabled to false has no effect in %s on line %d
2426
bool(false)
2527
bool(false)

0 commit comments

Comments
 (0)