note 117033 added to function.method-exists
| From: | w3dk | Date: | Sat, 04 Apr 2015 22:38:47 +0000 |
| Subject: | note 117033 added to function.method-exists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-202166@lists.php.net to get a copy of this message | ||
A couple of the older comments (specifically "jp at function dot fi" and "spam at
majiclab dot com") state that is_callable() does not respect a methods visibility when checked
outside of that class. ie. That private/protected methods are seen as callable when tested publicly.
However, this was a bug (#29210) in early versions of PHP 5 and was fixed (according to the
changelog) in PHP 5.0.5 (and/or PHP 5.1.0).
Bug #29210 - Function: is_callable - no support for private and protected classes
http://bugs.php.net/29210
Changelog - Fixed bug #29210 (Function: is_callable - no support for private and protected classes).
(Dmitry)
http://php.net/ChangeLog-5.php#5.1.0
----
Server IP: 72.52.91.14
Probable Submitter: 86.183.91.175
----
Manual Page -- http://php.net/manual/en/function.method-exists.php
Edit -- https://master.php.net/note/edit/117033
Del: integrated -- https://master.php.net/note/delete/117033/integrated
Del: useless -- https://master.php.net/note/delete/117033/useless
Del: bad code -- https://master.php.net/note/delete/117033/bad+code
Del: spam -- https://master.php.net/note/delete/117033/spam
Del: non-english -- https://master.php.net/note/delete/117033/non-english
Del: in docs -- https://master.php.net/note/delete/117033/in+docs
Del: other reasons-- https://master.php.net/note/delete/117033
Reject -- https://master.php.net/note/reject/117033
Search -- https://master.php.net/manage/user-notes.php