On Tue, 2007-01-09 at 10:01 +1100, Chris wrote: > Bill Moran wrote: > > With reference to: > > http://bugs.php.net/bug.php?id=40067 > > > > I'm confused as to why this was marked bogus, and the message that > > marked as such doesn't give much insight. > > > > It would seem to me that infinite recursion within PHP is a bug. > > Shouldn't the interpreter catch this sort of thing before it > > coredumps? Or is the design philosophy for PHP different than > > that? > > > > If anyone can point me to a online explanation for this or other > > resource, I'd be happy to read up a bit. More than happy to understand > > why I'm wrong, but right now I feel as if this problem is getting the > > brush-off. > > Getting the interpreter to catch infinite recursion would be bad (imo). > > It can actually come in handy if you handle it properly: > > while (true) { > ... do stuff > if ($conditions_are_met) { > break; > } > } Determining infinite recursion pre-emptively is too much work. But it should be able to catch too much recursion causing memory exhaustion. Cheers, Rob. -- .------------------------------------------------------------. | InterJinn Application Framework - http://www.interjinn.com | :------------------------------------------------------------: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `------------------------------------------------------------' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php