note 103599 added to function.is-callable
| From: | lx at webactives dot ru | Date: | Thu, 21 Apr 2011 20:10:56 +0000 |
| Subject: | note 103599 added to function.is-callable | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-179063@lists.php.net to get a copy of this message | ||
is_callable correctly work with Closure (PHP 5.3). Simple test:
<?php
function is_callable_test(Closure $func=null){
if (is_callable($func)){
$func();
}else{
echo 'uncaleble', "\n";
}
}
$win_text = 'is_callable function work correctly!';
is_callable_test(function () use ($win_text){
echo $win_text, "\n";
});
?>
----
Server IP: 195.54.192.44
Probable Submitter: 127.0.0.1
----
Manual Page -- http://www.php.net/manual/en/function.is-callable.php
Edit -- https://master.php.net/note/edit/103599
Del: integrated -- https://master.php.net/note/delete/103599/integrated
Del: useless -- https://master.php.net/note/delete/103599/useless
Del: bad code -- https://master.php.net/note/delete/103599/bad+code
Del: spam -- https://master.php.net/note/delete/103599/spam
Del: non-english -- https://master.php.net/note/delete/103599/non-english
Del: in docs -- https://master.php.net/note/delete/103599/in+docs
Del: other reasons-- https://master.php.net/note/delete/103599
Reject -- https://master.php.net/note/reject/103599
Search -- https://master.php.net/manage/user-notes.php