php.net |  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: 2020-02-05 20:11 UTC
Votes:1
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: salathe (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2014-10-23 07:42 UTC] jeroen at asystance dot nl
Description:
------------
---
From manual page: http://www.php.net/language.exceptions
---

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).


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-02-05 20:03 UTC] salathe@php.net
Automatic comment from SVN on behalf of salathe
Revision: http://svn.php.net/viewvc/?view=revision&revision=349132
Log: Clarification on interaction between finally and return statements (doc bug #68290)

Patch by Sorin Nunca
 [2020-02-05 20:11 UTC] salathe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: salathe
 [2020-02-05 20:11 UTC] salathe@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2020-02-05 21:22 UTC] mumumu@php.net
Automatic comment from SVN on behalf of mumumu
Revision: http://svn.php.net/viewvc/?view=revision&revision=349136
Log: Clarification on interaction between finally and return statements (doc bug #68290)

Patch by Sorin Nunca
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Apr 01 03:01:22 2020 UTC