mathieu.suen wrote:
> 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

I think you actually misunderstand the difference in
http://en.wikipedia.org/wiki/Closure_%28computer_science%29#Differences_in_semantics

The way I read if the difference is wether it returns from the closure
function or the surrounding function *calling* it. Not the *defining* scope.

And no, it doesn't make sense in the PHP context IMHO.

- Chris

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

Reply via email to