Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48175 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11401 invoked from network); 3 May 2010 13:28:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 May 2010 13:28:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=jille@quis.cx; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=jille@quis.cx; sender-id=unknown Received-SPF: error (pb1.pair.com: domain quis.cx from 82.94.237.14 cause and error) X-PHP-List-Original-Sender: jille@quis.cx X-Host-Fingerprint: 82.94.237.14 mulgore.hexon-is.nl Received: from [82.94.237.14] ([82.94.237.14:54448] helo=mulgore.hexon-is.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 80/10-09795-B6FCEDB4 for ; Mon, 03 May 2010 09:28:12 -0400 Received: from adidas.hexon-nijmegen.nl (gw.hexon-nijmegen.nl [82.93.241.107]) by mulgore.hexon-is.nl (8.14.3/8.14.3) with ESMTP id o43DS0nH001902; Mon, 3 May 2010 15:28:00 +0200 Received: from [10.0.0.142] (HENK.hexon-nijmegen.nl [10.0.0.142]) by adidas.hexon-nijmegen.nl (8.14.3/8.14.3) with ESMTP id o43DS0Ni013732; Mon, 3 May 2010 15:28:00 +0200 Message-ID: <4BDECF5B.4080905@quis.cx> Date: Mon, 03 May 2010 15:27:55 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: "mathieu.suen" CC: PHP internals References: <4BDEC91F.9080305@easyflirt.com> In-Reply-To: <4BDEC91F.9080305@easyflirt.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Hexon-MailScanner-Information: Please contact the ISP for more information X-Hexon-MailScanner-ID: o43DS0nH001902 X-Hexon-MailScanner: Found to be clean X-Hexon-MailScanner-From: jille@quis.cx X-Hexon-MailScanner-Watermark: 1273498083.97938@rc4FTy9P6jZAtQnXXxZBTA Subject: Re: [PHP-DEV] Closure local return From: jille@quis.cx (Jille Timmermans) Are you serious? Op 3-5-2010 15:01, mathieu.suen schreef: > 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 > > So I am asking if there has been some discussion on it or if it could be > added? > > Thanks > > --Mathieu Suen > > > >