note 40410 added to function.is-callable

From: Date: Wed, 03 Mar 2004 06:50:33 +0000
Subject: note 40410 added to function.is-callable
Groups: php.notes 
Request: Send a blank email to php-notes+get-66145@lists.php.net to get a copy of this message
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; } ---- Manual Page -- http://www.php.net/manual/en/function.is-callable.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+40410 Delete -- http://master.php.net/manage/user-notes.php?action=delete+40410&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+40410&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#66145) next »