php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: laruence@php.net
New email:
PHP Version: OS:

 

 [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 08:01:28 2025 UTC