Re: PHP 5.1

From: Date: Tue, 07 Jun 2005 12:36:12 +0000
Subject: Re: PHP 5.1
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-16506@lists.php.net to get a copy of this message
On Tue, 7 Jun 2005, Stanislav Malyshev wrote: > GB>>control structures are not useful. This is not the case in PHP. A > GB>>simple example in the manual showing proper usage of break/continue > GB>>and warning to only use goto as a last resort would be sufficient for > GB>>discouraging newbies from shooting their feet off. > > The problem is not only that - the problem is that some constructs might > be unsafe to jump in. Example - jumping in or out of foreach may be > very problematic with current engine (jumping in may result in crash, > jumping out - in memory leaks). And there can be more such things. AFAIK jumping into a foreach is the only real dagerous thing here - something that is simply a technical challenge which we can certainly over come. Those memory leaks are no real problem, as the Engine cleans that up at the end of the request anyway - documenting that you shouldn't jump out of a foreach loop if you *really* care about this minor issue is then adequate - although I again see that this problem can be solved too. Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org

« previous php.internals (#16506) next »