Re: [RFC] Supports 'finally' keyword for PHP exceptions
| From: | Andrew Faulds | Date: | Tue, 24 Jul 2012 13:50:40 +0000 |
| Subject: | Re: [RFC] Supports 'finally' keyword for PHP exceptions | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-61683@lists.php.net to get a copy of this message | ||
On 24/07/12 14:48, Johannes Schlüter wrote:
On Tue, 2012-07-24 at 19:20 +0800, Laruence wrote:Hi: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.As the previous threads disscussed, I make a implemention.here is the RFC: https://wiki.php.net/rfc/finallyany suggestions?thanks