Re: catching exception using a variable passed by reference
| From: | Nikita Popov | Date: | Sun, 06 May 2012 10:16:47 +0000 |
| Subject: | Re: catching exception using a variable passed by reference | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-60490@lists.php.net to get a copy of this message | ||
On Sun, May 6, 2012 at 6:04 AM, Laruence <laruence@php.net> wrote:
> Hi:
> after a deep look, I think it's not a bug.
>
> the exception in the catch block is only a local var of that block.
Not sure this makes sense to me. PHP does not have block scopes; all
variables in a function are in the same scope. For example the
$exception variable will also be available after the catch block. So
to me it would make sense if the outer variable would be changed :)
Nikita