Hello,

On Mon, May 3, 2010 at 3:01 PM, mathieu.suen <mathieu.s...@easyflirt.com> wrote:
> Hi,
>
> The statement 'return' in a closure is now returning from the scope that
> evaluate the closure (evaluation scope).
> It could have been in an other way.
> It could mean return from the  scope were the closure is create (define
> scope).
>
> May be it could be interesting to have a syntax for returning from the
> define scope.
> For example.
>
> $findedElment = $myList->selectIfAbsent($fooo, function(){
>    return 'No item founded'; //Retrun from the define scope
> })
> //Do somthing with $findedElment

uh? Could you please provide a clear example of what you mean, in
contrast of how it works now.

"return" returns to just after the call, returning somewhere else
doesn't make much sense IMHO.

>
> So  I am asking if there has been some discussion on it or if it could be
>  added?
>
> Thanks
>
> --Mathieu Suen
>
>
>
>



-- 
Etienne Kneuss
http://www.colder.ch

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to