Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61683 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96142 invoked from network); 24 Jul 2012 13:51:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jul 2012 13:51:06 -0000 Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 64.22.89.133 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 64.22.89.133 oxmail.registrar-servers.com Linux 2.6 Received: from [64.22.89.133] ([64.22.89.133:43140] helo=oxmail.registrar-servers.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A6/36-17533-848AE005 for ; Tue, 24 Jul 2012 09:51:05 -0400 Received: from [192.168.0.200] (5ad32874.bb.sky.com [90.211.40.116]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by oxmail.registrar-servers.com (Postfix) with ESMTPSA id 6AF21C3008C for ; Tue, 24 Jul 2012 09:51:00 -0400 (EDT) Message-ID: <500EA830.1040801@ajf.me> Date: Tue, 24 Jul 2012 14:50:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: internals@lists.php.net References: <1343137723.2084.301.camel@guyrush> In-Reply-To: <1343137723.2084.301.camel@guyrush> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] Supports 'finally' keyword for PHP exceptions From: ajf@ajf.me (Andrew Faulds) On 24/07/12 14:48, Johannes Schlüter wrote: > On Tue, 2012-07-24 at 19:20 +0800, Laruence wrote: >> Hi: >> As the previous threads disscussed, I make a implemention. >> >> here is the RFC: https://wiki.php.net/rfc/finally >> >> any suggestions? >> >> thanks > As PHP has destructors there is less need for "finally" compared to > other languages. What are the cases where an extra language construct is > needed? (i.e. one can also use C++-like RAII things ...) > > The RFC is also missing to demonstrate the order of finally calls in > nested try-catch-blocks. > > johannes > > > Tempfiles come to mind. Also, yes, PHP has destructors, but you are not always dealing with custom-made objects to handle this. And you may want something to happen before GC.