I would expect is_callable() to return true (since it is callable), but method_exists() to return false (since it doesn't really exist, it's magic)... at least, that's what would make most sense to me...

Marcus Boerger wrote:
Hello Davey,

  if you ask me it is stupid to return true because __call exists since the
user can pretty easy do that by adding one more check. But he can in no way
query if the function really exists or not (well he can use reflection but
that is thousand times slower...)

regards
marcus

Saturday, July 9, 2005, 6:08:03 AM, you wrote:


Dear all,


I came across something when I found this bug (http://bugs.php.net/bug.php?id=33621).


Should is_callable() and method_exists() always return true when the method doesn't *really* exist? i.e. it would only be called via __call()


Is it possible to add an argument to make it only check "real" methods at the very least? Or some way to additionally distinguish between these
two things?


- Davey






--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to