#44910 [Asn->Bgs]: Restrict GOTOs from/to try catch blocks
| From: | dmitry@php.net | Date: | Thu, 15 May 2008 07:39:35 +0000 |
| Subject: | #44910 [Asn->Bgs]: Restrict GOTOs from/to try catch blocks | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-125010@lists.php.net to get a copy of this message | ||
ID: 44910
Updated by: dmitry@php.net
Reported By: colder@php.net
-Status: Assigned
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Irrelevant
PHP Version: 5.3CVS-2008-05-04 (CVS)
Assigned To: dmitry
New Comment:
This is not a bug but a design decision.
According to it the only GOTO limitation is a prohibition to jump into
loop or SWITCH statements. However, it may safely jump over try/catch
boundaries.
Previous Comments:
------------------------------------------------------------------------
[2008-05-04 12:22:38] colder@php.net
Description:
------------
Currently, things like that are allowed:
try { ... plop: } catch(Exception $e) { goto plop; }
try { } catch(Exception1 $e) { goto plop; } catch(Exception2 $e) {
plop: }
GOTOs shouldn't be allowed in those cases.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44910&edit=1