diff options
| author | Joe Watkins <krakjoe@php.net> | 2017-01-04 13:32:37 +0000 |
|---|---|---|
| committer | Joe Watkins <krakjoe@php.net> | 2017-01-04 13:34:31 +0000 |
| commit | 63d116e5711e995f201ba6411bcb3929e5cbf041 (patch) | |
| tree | aae76d3c3805558086a8bf31454a8a0da5d242fc /tests/basic | |
| parent | e914abff1e88092216e453234224860514d5e5cc (diff) | |
| parent | 33721742a59a34989d54846432a04ae62a4939bb (diff) | |
| download | php-git-63d116e5711e995f201ba6411bcb3929e5cbf041.tar.gz | |
Merge branch 'pull-request/1312' into PHP-7.0
* pull-request/1312:
get_defined_functions extra parameter to exclude disabled functions
news entry for PR #1312
Diffstat (limited to 'tests/basic')
| -rw-r--r-- | tests/basic/bug31875.phpt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/basic/bug31875.phpt b/tests/basic/bug31875.phpt new file mode 100644 index 0000000000..78085d766b --- /dev/null +++ b/tests/basic/bug31875.phpt @@ -0,0 +1,23 @@ +--TEST-- +Bug #31875 get_defined_functions() should not list disabled functions +--CREDITS-- +Willian Gustavo Veiga <contact@willianveiga.com> +--INI-- +disable_functions=dl +--FILE-- +<?php +$disabled_function = 'dl'; + +$functions = get_defined_functions(); +var_dump(in_array($disabled_function, $functions['internal'])); + +$functions = get_defined_functions(false); +var_dump(in_array($disabled_function, $functions['internal'])); + +$functions = get_defined_functions(true); +var_dump(in_array($disabled_function, $functions['internal'])); +?> +--EXPECTF-- +bool(true) +bool(true) +bool(false) |
