Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:3747 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7979 invoked by uid 1007); 6 Aug 2003 00:15:40 -0000 Message-ID: <20030806001540.7978.qmail@pb1.pair.com> To: internals@lists.php.net Date: Tue, 5 Aug 2003 21:15:39 -0300 Lines: 22 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Posted-By: 200.196.104.198 Subject: try/catch/FINALLY From: cunha17@uol.com.br ("Cristiano Duarte") Hi all, I know there was a lot of discussion about try/catch, but I will bring it up again: What about finally ? I know someone posted that finally isn't necessary since PHP destroy all variables and releases all resources at the end of the script. But if the script is a PHP-GTK application or a standalone server aplication (like CORBA)? Finally is very useful in situations where you must be certain that some piece of code will be executed no matter what happens (a normal execution, a return statement or an exception). IMHO I think that an implementation start would be hooking the function exit at the engine.. Cristiano Duarte