|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-07-29 00:59 UTC] iliaa@php.net
[2004-07-29 20:06 UTC] freeload at softhome dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 08 18:00:01 2025 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)