|
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] tony2001@php.net
[2005-03-07 20:12 UTC] sniper@php.net
[2005-04-27 17:46 UTC] dmitry@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 23: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)