Re: Revise callback Psuedo-type to support new Closure class ?
| From: | Nathan Nobbe | Date: | Wed, 24 Nov 2010 18:03:45 +0000 |
| Subject: | Re: Revise callback Psuedo-type to support new Closure class ? | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-50477@lists.php.net to get a copy of this message | ||
Ummm... never mind!
Sorry for the noise!
-nathan
On Wed, Nov 24, 2010 at 11:00 AM, Nathan Nobbe <quickshiftin@gmail.com>wrote:
> Hi all,
>
> I had a thought this morning and would like some feedback. Don't you think
> it would make sense to allow the callback psuedo-type to also allow the new
> Closure class to be an acceptable data type? A simple example that would be
> nice to have working would be
>
> <?php
> $fClosure = function($val, $key) {
> echo "$key => $val" . PHP_EOL;
> }
>
> $aNumbers = array(5, 4, 3, 2, 1);
>
> array_walk($aNumbers, $fClosure);
> ?>
>
> Thoughts ?
>
> -nathan
>