RE: [PHP-DEV] PHP 5.1

From: Date: Mon, 06 Jun 2005 11:48:04 +0000
Subject: RE: [PHP-DEV] PHP 5.1
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-16417@lists.php.net to get a copy of this message
DR>>We're only talking about a goto that: DR>>- can only jump to a static label DR>>- can only jump inside the current scope DR>> DR>>With a parameterized break/continue you still can't just to the "end" of DR>>your function to do clean ups (unless you wrap it in a control block finally construct should do that, I think. IMO that's the right solution, not goto's - and anyway if you allow goto only inside same block, what if error condition happens inside other block? Are all your functions flat without control blocks? What if exception happens - are you not going to clean up then? And if you allow goto's to jump out of control blocks, all kinds of non nice things can happen - e.g. not cleaning up variables if engine planned to clean them up later in the block. And you still have problem with exceptions. DR>>which is ugly and already possible anyway). Using control blocks is no more ugly than using goto's - and thr right way to do it is using exception handling and finally, IMO. -- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115

« previous php.internals (#16417) next »