php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79668 get_defined_functions(true) may miss functions
Submitted: 2020-06-03 08:07 UTC Modified: 2020-06-03 08:07 UTC
From: cmb@php.net Assigned: cmb (profile)
Status: Closed Package: PHP options/info functions
PHP Version: 7.3Git-2020-06-03 (Git) OS: *
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: cmb@php.net
New email:
PHP Version: OS:

 

 [2020-06-03 08:07 UTC] 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)


Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-06-03 08:07 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 [2020-06-03 08:53 UTC] cmb@php.net
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
 [2020-06-04 07:11 UTC] cmb@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=b8e7b30b4715ae5f052dec428d82b705e29220b7
Log: Fix #79668: get_defined_functions(true) may miss functions
 [2020-06-04 07:11 UTC] cmb@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 15:01:29 2024 UTC