> > The second argument seems to be for checking syntax only, but I can't > > figure out how to make is_callable return FALSE when the second > > argument is TRUE. > > Try this: > > var_dump(is_callable(array(1,2), true));
Hmm...OK. Yes, that does make is_callable return false. Can you explain the logic behind this? I tried lots of other values and got TRUE. For example: var_dump(is_callable(array('$$$','%^&'), true)); var_dump(is_callable('%^&', true)); These aren't valid identifiers, but the function is (apparently) reporting that syntax is OK. > Well, $name is just supposed to indicate which class/method you were > checking. It doesn't tell you whether the method is static or not, > because in PHP 4 it doesn't make sense. Ah, yeah, I guess there isn't a way to tell if a method is callable statically or not unless you check that it contains no references to instance properties. So, would it be fair to say this function is intended for debugging the core? And, if you have the time, could you describe the situation where this function is useful? Thanks Much! Leon -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php