Date: 11/09/00
- Next message: void: "Re: [PHP-DEV] PHP 4.0 Bug #7720 Updated: Return address in stackoverwritten?"
- Previous message: void: "Re: [PHP-DEV] PHP 4.0 Bug #7720 Updated: Return address in stack overwritten?"
- In reply to: void: "Re: [PHP-DEV] PHP 4.0 Bug #7720 Updated: Return address in stack overwritten?"
- Next in thread: void: "Re: [PHP-DEV] PHP 4.0 Bug #7720 Updated: Return address in stackoverwritten?"
- Reply: void: "Re: [PHP-DEV] PHP 4.0 Bug #7720 Updated: Return address in stackoverwritten?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
You can't do infinite recursions in PHP, for obvious reasons. It doesnt work
in any other sane language either. Try
void function() {
int i;
function();
}
in C, and marvel as you run out of stack. This isnt a bug in PHP, though its
not handled that gracefully. 10,000 recursions is an awful lot anyway, and
you should look at other methods to accomplish your goal (think of the
memory usage even if you had enough stack!), imho.
adamw
----- Original Message -----
From: "void" <sven <email protected>>
To: "Stanislav Malyshev" <stas <email protected>>
Cc: <derick <email protected>>; <php-dev <email protected>>
Sent: Thursday, November 09, 2000 12:47 PM
Subject: Re: [PHP-DEV] PHP 4.0 Bug #7720 Updated: Return address in
stackoverwritten?
> Hi,
>
> On Thu, 9 Nov 2000, Stanislav Malyshev wrote:
>
> > v>> I want some 10.000 recursions no infinte ones. I get about 6.000
> > v>> then its over. I can't work like this. Fix it please.
> >
> > I'm afraid PHP team cannot fix it. You just get out of the available
> > stack. Unroll your recursion to a loop - anyway a wise move if you have
so
> > many repeats.
>
> Go ahead and do this with your engine, eh?
>
>
> --
> 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>
>
>
-- 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: void: "Re: [PHP-DEV] PHP 4.0 Bug #7720 Updated: Return address in stackoverwritten?"
- Previous message: void: "Re: [PHP-DEV] PHP 4.0 Bug #7720 Updated: Return address in stack overwritten?"
- In reply to: void: "Re: [PHP-DEV] PHP 4.0 Bug #7720 Updated: Return address in stack overwritten?"
- Next in thread: void: "Re: [PHP-DEV] PHP 4.0 Bug #7720 Updated: Return address in stackoverwritten?"
- Reply: void: "Re: [PHP-DEV] PHP 4.0 Bug #7720 Updated: Return address in stackoverwritten?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

