Req #32100 [ReO->Csd]: Request 'finally' support for exceptions
From: laruence@php.net Date: Mon, 13 Aug 2012 13:49:22 +0000 Subject: Req #32100 [ReO->Csd]: Request 'finally' support for exceptions References: 1 Groups: php.bugs Request: Send a blank email to php-bugs+get-172581@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=32100&edit=1
ID: 32100
Updated by: laruence@php.net
Reported by: ceefour at gauldong dot net
Summary: Request 'finally' support for exceptions
-Status: Re-Opened
+Status: Closed
Type: Feature/Change Request
Package: *General Issues
Operating System: *
PHP Version: 5.*
Assigned To: laruence
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2012-08-03 04:47:29] ceefour at gauldong dot net
This is awesome !
My next suggestion would be automatic resource management.
e.g. in Scala :
import resource._
val first_ten_bytes = managed(new FileInputStream("test.txt")) map {
input =>
val buffer = new Array[Byte](10)
input.read(buffer)
buffer
}
or in Java 7 :
static String readFirstLineFromFile(String path) throws IOException {
try (BufferedReader br =
new BufferedReader(new FileReader(path))) {
return br.readLine();
}
}
But "finally" as it stands already rocks!!! Hopefully we can see it in PHP sooner than
later..... We've been waiting for a little bit too long (7 years) ;-)
------------------------------------------------------------------------
[2012-08-03 04:38:39] ceefour at gauldong dot net
Finally! :-)
Thanks a lot
------------------------------------------------------------------------
[2012-07-26 02:10:42] laruence@php.net
RFC complete, https://wiki.php.net/rfc/finally
------------------------------------------------------------------------
[2012-07-25 23:44:07] pravdin at vl dot ru
We are writing large web application on PHP using the OOP and programming
patterns. Exceptions are not only error reporting mechanism but also very
important program flow mechanism. So, try...finally is commonly needed. Please add
this feature. I know, PHP is not OOP, but I think there is no reason to limit
developers needs, especially when this needs are not for just a few single
developers.
------------------------------------------------------------------------
[2012-07-24 10:59:57] laruence@php.net
I will try to make a implemention.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=32100
--
Edit this bug report at https://bugs.php.net/bug.php?id=32100&edit=1
Thread (53 messages)
- #32100 [Opn]: Request 'finally' support for exceptions
- #32100 [Opn]: Request 'finally' support for exceptions
- #32100 [Opn->Csd]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Csd->ReO]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [ReO]: Request 'finally' support for exceptions
- Req #32100 [ReO]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [ReO->Csd]: Request 'finally' support for exceptions
- Req #32100 [Com]: Request 'finally' support for exceptions
- Req #32100 [Csd]: Request 'finally' support for exceptions
| « previous | php.bugs (#172581) | next » |
|---|