On 05/03/2010 05:42 PM, Christian Schneider wrote:
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 $findedElmentI 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.
You need to give me more argument on that point.
- Chris
-- Mathieu Suen
