mirror of
https://github.com/php/php-src.git
synced 2024-12-02 22:34:55 +08:00
b8e7b30b47
Instead of some brittle and unefficient string matching, we can just check for the function handler.
17 lines
361 B
PHP
17 lines
361 B
PHP
--TEST--
|
|
Bug #79668 (get_defined_functions(true) may miss functions)
|
|
--INI--
|
|
disable_functions=sha1_file,password_hash
|
|
--FILE--
|
|
<?php
|
|
$df = get_defined_functions(true);
|
|
foreach (['sha1', 'sha1_file', 'hash', 'password_hash'] as $funcname) {
|
|
var_dump(in_array($funcname, $df['internal'], true));
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|
|
bool(false)
|
|
bool(true)
|
|
bool(false)
|