Possibility to add finally to try/catch?
| From: | Dmitri Snytkine | Date: | Tue, 28 Feb 2012 14:05:28 +0000 |
| Subject: | Possibility to add finally to try/catch? | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-58234@lists.php.net to get a copy of this message | ||
This is another feature that we know we can live without
but those familiar with languages that have 'finally' like Java or Python
know that
it is very neat feature to have in some situations.
Basically the code inside 'finally' is guaranteed to run even if there is a
'return' inside try or catch blocks
in which case the value to be returned is remembered tempraraly, the code
inside finally block executes and then remembered value is returned.
Dmitri Snytkine
Web Developer
Ultra Logistics, Inc.
Phone: (888) 220-4640 x 2097
Fax: (888) 795-6642
E-Mail: dsnytkine@ultralogistics.com
Web: www.ultralogistics.com
"A Top 100 Logistics I.T. Provider in 2011"