note 40410 deleted from function.is-callable by nlopess
| From: | nlopess@php.net | Date: | Wed, 03 Mar 2004 17:45:16 +0000 |
| Subject: | note 40410 deleted from function.is-callable by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-66197@lists.php.net to get a copy of this message | ||
Note Submitter: jacob_at_keystreams_dot_com
----
I've found this function I wrote to be useful:
function isCallable($call)
{
if (is_array($call) && count($call) >= 2 && is_callable(array($call[0],
$call[1])))
if (is_string($call[0]))
return $call[0] . '::' . $call[1];
else
return $call[0] . '->' . $call[1];
elseif (is_string($call) && is_callable($call))
return $call;
else return false;
}