Re: [RFC] Supports 'finally' keyword for PHP exceptions
| From: | Xinchen Hui | Date: | Tue, 24 Jul 2012 12:03:48 +0000 |
| Subject: | Re: [RFC] Supports 'finally' keyword for PHP exceptions | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-61678@lists.php.net to get a copy of this message | ||
Sent from my iPhone
在 2012-7-24,19:51,Rafael Kassner <kassner@gmail.com> 写道:
Thanks Laruence.
If I perform something like this:
function test() {
try {
return 2;
} catch (Exception $e) {
} finally {
return 3;
}
}
What will be returned? There is no possibility to return something in
finally, or finally will overwrite the return?
overweite,although I think it make no sense return in finally block
But seems java allow that, so I implement it
Thanks
On Tue, Jul 24, 2012 at 8:45 AM, Laruence <laruence@php.net> wrote:
> On Tue, Jul 24, 2012 at 7:41 PM, Alexey Zakhlestin <indeyets@gmail.com>
> wrote:
> >
> > On 24.07.2012, at 15:20, Laruence wrote:
> >
> >> Hi:
> >> As the previous threads disscussed, I make a implemention.
> >>
> >> here is the RFC: https://wiki.php.net/rfc/finally
> >>
> >> any suggestions?
> >
> > Will it work without "catch" in your implementation?
> nope for now.
>
> but if it is needed, I can implemente it
>
> thanks
> >
> > try {
> > doSomethingDangerous();
> > } finally {
> > doCleanup();
> > }
>
>
>
> --
> Laruence Xinchen Hui
> http://www.laruence.com/
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Atenciosamente,
Rafael Kassner