xref: /PHP-8.2/tests/basic/bug31875.phpt (revision 462da6e0)
1--TEST--
2Bug #31875 get_defined_functions() should not list disabled functions
3--CREDITS--
4Willian Gustavo Veiga <contact@willianveiga.com>
5--INI--
6disable_functions=dl
7--FILE--
8<?php
9$disabled_function = 'dl';
10
11/* exclude_disabled parameters is hardcoded to true */
12
13$functions = get_defined_functions();
14var_dump(in_array($disabled_function, $functions['internal']));
15
16$functions = get_defined_functions(false);
17var_dump(in_array($disabled_function, $functions['internal']));
18
19$functions = get_defined_functions(true);
20var_dump(in_array($disabled_function, $functions['internal']));
21?>
22--EXPECTF--
23bool(false)
24
25Deprecated: get_defined_functions(): Setting $exclude_disabled to false has no effect in %s on line %d
26bool(false)
27bool(false)
28