This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:dev:all:psr:psr-2 [26.05.2015 20:22] – [Closures] translated mrbaseman | en:dev:all:psr:psr-2 [31.03.2017 06:59] (current) – [try, catch] Manuela v.d.Decken | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | FIXME **This page is not fully translated, yet. Please help completing the translation.**\\ //(remove this paragraph once the translation is finished)// | ||
| - | |||
| [size=10]originating from [[http:// | [size=10]originating from [[http:// | ||
| ====== Coding Style Guide ====== | ====== Coding Style Guide ====== | ||
| Line 307: | 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 316: | Line 314: | ||
| } catch (OtherExceptionType $e) { | } catch (OtherExceptionType $e) { | ||
| // catch body | // catch body | ||
| + | } finally { | ||
| + | // finally body | ||
| } | } | ||
| </ | </ | ||