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: -
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:
MUST BE VALID
Solve the problem:
34 + 24 = ?
Subscribe to this entry?

 
 [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

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Aug 19 11:01:29 2019 UTC