|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #68290 "finally" keyword barely explained
Submitted: 2014-10-23 07:42 UTC Modified: -
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: jeroen at asystance dot nl Assigned:
Status: Open Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
20 + 25 = ?
Subscribe to this entry?

 [2014-10-23 07:42 UTC] jeroen at asystance dot nl
From manual page:

The example (#2) given to illustrate the "finally" keyword works exactly the same (i.e. produces the same output) without finally. Therefore, the documentation does not show any benefit to using it, nor does it make clear how it affects the execution flow.

Fortunately, there are a few user contributed notes which show effects of finally. It should however not be up to users to explain basic syntax, especially since there are apparently some non-intuitive aspects (e.g. finally block being run _after_ return in the try block).


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Dec 13 05:01:26 2019 UTC