This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| en:dev:all:psr:psr-2 [03.06.2015 15:55] – Externe Bearbeitung 127.0.0.1 | en:dev:all:psr:psr-2 [31.03.2017 06:59] (current) – [try, catch] Manuela v.d.Decken | ||
|---|---|---|---|
| Line 305: | Line 305: | ||
| - | ==== try, catch ==== | + | ==== try, catch, finally |
| A **try catch** block looks like the following. Note the placement of parentheses, | A **try catch** block looks like the following. Note the placement of parentheses, | ||
| <PHP> | <PHP> | ||
| Line 314: | Line 314: | ||
| } catch (OtherExceptionType $e) { | } catch (OtherExceptionType $e) { | ||
| // catch body | // catch body | ||
| + | } finally { | ||
| + | // finally body | ||
| } | } | ||
| </ | </ | ||