note 92664 added to functions.anonymous
| From: | Anonymous at osu1 dot php dot net | Date: | Mon, 03 Aug 2009 09:50:52 +0000 |
| Subject: | note 92664 added to functions.anonymous | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-159024@lists.php.net to get a copy of this message | ||
If you want to check whether you're dealing with a closure specifically and not a string or
array callback you can do this:
<?php
$isAClosure = is_callable($thing) && is_object($thing);
?>
----
Server IP: 87.124.35.190
Probable Submitter: 78.147.236.135
----
Manual Page -- http://www.php.net/manual/en/functions.anonymous.php
Edit -- https://master.php.net/note/edit/92664
Del: integrated -- https://master.php.net/note/delete/92664/integrated
Del: useless -- https://master.php.net/note/delete/92664/useless
Del: bad code -- https://master.php.net/note/delete/92664/bad+code
Del: spam -- https://master.php.net/note/delete/92664/spam
Del: non-english -- https://master.php.net/note/delete/92664/non-english
Del: in docs -- https://master.php.net/note/delete/92664/in+docs
Del: other reasons-- https://master.php.net/note/delete/92664
Reject -- https://master.php.net/note/reject/92664
Search -- https://master.php.net/manage/user-notes.php