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 Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
15 + 43 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

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: Thu Mar 28 23:01:26 2024 UTC