diff options
author | Joe Watkins <krakjoe@php.net> | 2017-01-04 13:36:28 +0000 |
---|---|---|
committer | Joe Watkins <krakjoe@php.net> | 2017-01-04 13:37:06 +0000 |
commit | d83828540e7b88f99dd8d5ed4c295e62056e5044 (patch) | |
tree | 181310de4f9a448f4fa40acc31faa9b8ef384646 /tests/basic | |
parent | 8bc2155bf955eb388e1197a6f5987105aecf5742 (diff) | |
parent | 6c9164047e7b5c1879d7d43d36622aec8e83d7aa (diff) | |
download | php-git-d83828540e7b88f99dd8d5ed4c295e62056e5044.tar.gz |
Merge branch 'PHP-7.1'
* PHP-7.1:
get_defined_functions additional 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) |