Bug #79668 [PATCH]: get_defined_functions(true) may miss functions
| From: | cmb@php.net | Date: | Wed, 03 Jun 2020 08:53:51 +0000 |
| Subject: | Bug #79668 [PATCH]: get_defined_functions(true) may miss functions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-227281@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79668&edit=1
ID: 79668
Patch added by: cmb@php.net
Reported by: cmb@php.net
Summary: get_defined_functions(true) may miss functions
Status: Assigned
Type: Bug
Package: PHP options/info functions
Operating System: *
PHP Version: 7.3Git-2020-06-03 (Git)
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
The following pull request has been associated:
Patch Name: Fix #79668: get_defined_functions(true) may miss functions
On GitHub: https://github.com/php/php-src/pull/5657
Patch: https://github.com/php/php-src/pull/5657.patch
Previous Comments:
------------------------------------------------------------------------
[2020-06-03 08:07:52] cmb@php.net
Description:
------------
The return value of get_defined_functions(true) does not contain
functions whose names match *parts* of function names in
disable_functions.
Test script:
---------------
$ cat disable.php
<?php
$df = get_defined_functions(true);
var_dump(in_array('sha1', $df['internal'], true));
var_dump(is_string(sha1('foo')));
var_dump(in_array('hash', $df['internal'], true));
var_dump(is_string(hash('md5', 'foo')));
?>
$ php -d disable_functions=sha1_file,password_hash disable.php
Expected result:
----------------
bool(true)
bool(true)
bool(true)
bool(true)
Actual result:
--------------
bool(false)
bool(true)
bool(false)
bool(true)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79668&edit=1