Date: 07/09/00
- Next message: Shane Caraveo: "Re: [PHP-DEV] *crash* on try to find out how many nestinglevelsare allowed"
- Previous message: Jelmer Vernooij: "Re: [PHP-DEV] PHP 4.0 Bug #5489: Nesting level too deep"
- In reply to: Shane Caraveo: "Re: [PHP-DEV] *crash* on try to find out how many nesting levelsare allowed"
- Next in thread: Shane Caraveo: "Re: [PHP-DEV] *crash* on try to find out how many nestinglevelsare allowed"
- Reply: Shane Caraveo: "Re: [PHP-DEV] *crash* on try to find out how many nestinglevelsare allowed"
- Reply: Dominic J. Eidson: "Re: [PHP-DEV] *crash* on try to find out how many nesting levelsare allowed"
- Reply: Manuel Lemos: "Re: [PHP-DEV] *crash* on try to find out how many nestinglevelsare allowed"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
At 10:41 09/07/00 -0400, Shane Caraveo wrote:
>Stanislav Malyshev wrote:
> >
> > w>> I wanted to find out how many nesting levels are allowed, but after
> > w>> class "a" gets instanciated from inside of "b", PHP crashes, that
> should
> > w>> not be.
> >
> > And what did you expect? You tried to crash it, you succeeded. Infinite
> > recursion leads to crash. Try it in C, you get the same.
>
>That's an entirely lame attitude. The goal here should be a stable php,
>irregardless of the quality of code php is running. In the case of
>infinite loops, recursions, etc., php can either throw an error if it is
>somehow recognizable, or it can simply timeout. Allowing it to crash
>because 'infinite recursion leads to crash' is pathetic. If it crashes,
>it can be fixed.
Shane,
Your attitude is also incorrect. It can only be fixed, as far as I know, by
adding code which will limited the amount of recursive function calls. This
will not only slow down PHP but it will also pose the question of where the
limit is. Not all systems have the same stack size or each up the stack at
the same rate.
In my opinion, we are better off leaving it the way it is for now although
for multi-threaded servers we might want to enable the *slow* approach.
Anyway, maybe the best is not to write infinite recursion?
Andi
--- Andi Gutmans <andi <email protected>> http://www.zend.com/-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Shane Caraveo: "Re: [PHP-DEV] *crash* on try to find out how many nestinglevelsare allowed"
- Previous message: Jelmer Vernooij: "Re: [PHP-DEV] PHP 4.0 Bug #5489: Nesting level too deep"
- In reply to: Shane Caraveo: "Re: [PHP-DEV] *crash* on try to find out how many nesting levelsare allowed"
- Next in thread: Shane Caraveo: "Re: [PHP-DEV] *crash* on try to find out how many nestinglevelsare allowed"
- Reply: Shane Caraveo: "Re: [PHP-DEV] *crash* on try to find out how many nestinglevelsare allowed"
- Reply: Dominic J. Eidson: "Re: [PHP-DEV] *crash* on try to find out how many nesting levelsare allowed"
- Reply: Manuel Lemos: "Re: [PHP-DEV] *crash* on try to find out how many nestinglevelsare allowed"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

