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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 05:01:28 2024 UTC