The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

My bad, I totally misunderstood the meaning of &quot;finally&quot;. I guess I dont really see the point of using it then, since the code in the "finally" clause gets executed regardless of the results of the "try" block and as such it doesnt seem that different to me than any regular code that were to exist after the try-catch. Does php5 support finally? I couldn't find any information on this.

There's at least one site cached by Google that makes the claim that finally is supported, but
the ultimate documentation contains no mention of finally.

The recommended work-around seems to be &quot;catch (Exception $e)&quot; -- using the most generic possible
catch to serve as a default catcher. This means that you get messy code, of course, or duplicated
code (even worse IMO).

Far be it from me to call the Zend guys morons in a public forum, but «quack, quack»

When an exception is caught, isn't the script execution immediately halted? 'Finally' would also btw catch the exception if you decided to throw it, in the example I gave earlier, you'd still want to close the file handling connection?

I don't know why Zend forgot to add in 'finally' but I suppose they must have had their reasons, much like we do not have namespaces in PHP5 either