|
|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-08-29 06:53 UTC] [email protected]
[2005-03-07 20:12 UTC] [email protected]
[2005-04-27 17:46 UTC] [email protected]
|
|||||||||||||||||||||||||||||||||||||
|
All rights reserved. |
Last updated: Wed Jan 28 04:00:02 2026 UTC |
Description: ------------ The built in function is_callable, does not return false, on unreachable functions like protected and private ones. Reproduce code: --------------- <?php class test_class { private function test_func1(){} protected function test_func2(){} } $object = new test_class; var_dump(is_callable(array($object,'test_func1'))); echo chr(10); var_dump(is_callable(array($object,'test_func2'))); ?> Expected result: ---------------- bool(false) bool(false) Actual result: -------------- bool(true) bool(true)