php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Thank you for your help! If the status of the bug report you submitted changes, you will be notified. You may return here and check the status or update your report at any time.
The URL for your bug report is: https://bugs.php.net/bug.php?id=69315.
Bug #69315 disable_functions behaviors inconsistently
Submitted: 2015-03-27 06:40 UTC Modified: 2015-03-27 06:43 UTC
From: laruence@php.net Assigned: laruence (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2015-03-27 06:40 UTC] laruence@php.net
Description:
------------
please see the test script

similar issue also exists in class_exists

and opcodefy to call_user_func etc

Test script:
---------------
<?php

var_dump(function_exists("strlen"));
var_dump(is_callable("strlen"));
var_dump(strlen("aaaa"));

?>


Expected result:
----------------
bool(false)
bool(false)
NULL

Actual result:
--------------
in PHP7:

bool(false)
bool(true)
int(4)



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-03-27 06:43 UTC] laruence@php.net
-Assigned To: +Assigned To: laruence
 [2015-03-27 06:43 UTC] laruence@php.net
in PHP5 , the test script outputs:

bool(false)
bool(true)
PHP Warning:  strlen() has been disabled for security reasons in /tmp/1.php on line 5

Warning: strlen() has been disabled for security reasons in /tmp/1.php on line 5
NULL
 [2015-03-28 06:59 UTC] laruence@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=84d9426730fc1e7063cdc4fb0c25f8f382202431
Log: Fixed bug #69315
 [2015-03-28 06:59 UTC] laruence@php.net
-Status: Assigned +Status: Closed
 [2016-07-20 11:39 UTC] davey@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=84d9426730fc1e7063cdc4fb0c25f8f382202431
Log: Fixed bug #69315
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Apr 28 00:01:29 2025 UTC