note 106109 added to functions.anonymous
| From: | darkdevine at hotmail dot de | Date: | Tue, 11 Oct 2011 12:37:16 +0000 |
| Subject: | note 106109 added to functions.anonymous | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-183781@lists.php.net to get a copy of this message | ||
I thought this might work:
<?php
$func = function( $msg ) use( &$func ) {
echo $msg;
return $func;
}
$func( 'This' )( 'doesn\'t' )( 'work' )( 'sadly :(' );
?>
It doesn't
----
Server IP: 69.147.83.197
Probable Submitter: 217.92.153.78
----
Manual Page -- http://www.php.net/manual/en/functions.anonymous.php
Edit -- https://master.php.net/note/edit/106109
Del: integrated -- https://master.php.net/note/delete/106109/integrated
Del: useless -- https://master.php.net/note/delete/106109/useless
Del: bad code -- https://master.php.net/note/delete/106109/bad+code
Del: spam -- https://master.php.net/note/delete/106109/spam
Del: non-english -- https://master.php.net/note/delete/106109/non-english
Del: in docs -- https://master.php.net/note/delete/106109/in+docs
Del: other reasons-- https://master.php.net/note/delete/106109
Reject -- https://master.php.net/note/reject/106109
Search -- https://master.php.net/manage/user-notes.php