Bug #63422 [Opn->Nab]: incorrect work is_callable
| From: | pierrick@php.net | Date: | Sat, 03 Nov 2012 03:18:58 +0000 |
| Subject: | Bug #63422 [Opn->Nab]: incorrect work is_callable | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-174495@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=63422&edit=1
ID: 63422
Updated by: pierrick@php.net
Reported by: iblacksmoke at gmail dot com
Summary: incorrect work is_callable
-Status: Open
+Status: Not a bug
Type: Bug
Package: Scripting Engine problem
PHP Version: 5.4.8
Block user comment: N
Private report: N
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
There is a bug in your code
it should be is_callable(array($this, $method))
Previous Comments:
------------------------------------------------------------------------
[2012-11-02 18:04:50] iblacksmoke at gmail dot com
Description:
------------
Is_callable function doesnt determine ability to call private method in class, even if this call
made in context of class, from which you can call private function.
Test script:
---------------
class A {
public function test($method){
return (is_callable($this, $method)) ? 'yes' : 'no';
}
private function qwerty(){}
}
echo (new A)->test('qwerty');
Expected result:
----------------
yes
Actual result:
--------------
no
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=63422&edit=1