Yep, but then I expect a timeout error because my script is running more
than say 20 seconds...

Ronald

"Marco Schuler" <[EMAIL PROTECTED]> schreef in bericht
news:[EMAIL PROTECTED]
> Hi
>
> Am Don, 2003-09-04 um 12.40 schrieb Ronald van Raaphorst:
> > I normally program in clarion (www.softvelocity.com) and an infinite
> > recursive call will cause a heap overflow...
> >
> > As I only got a "This page cannot be displayed" page, an error must have
> > occurred, but it's not displayed...
>
> A computer cannot decide when a recursion is to deep. Imagine traversing
> a realy big tree. There a recursion can get realy deep.
>
> I don't know about the internals of php. But as it is an interpreter
> language, I would say that all variables or even the parsing tree are
> located on the heap. So this heap will probably be quite big! Thus, to
> produce a heap overflow will take a rather long time. (Correct me if I
> am wrong with my tought)
>
> A workaround could be that you have a counter (static variable!) in your
> recursion procedure or methode respectively. You increment this counter
> on every entry into the procedure and compare it to a limit that _you_
> specifiy.
>
> --
> Cheers!
>  Marco
>
>
> > At first I thought I had lost contact with the site, but then, after a
lot
> > of tracing, I found the source of the error.
> >
> > Ronald
> >
> >
> >
> > "Marek Kilimajer" <[EMAIL PROTECTED]> schreef in bericht
> > news:[EMAIL PROTECTED]
> > > I don't think it is even possible, if the recursive calls don't seem
> > > infinite to inteligent human being, how should a stupid computer
program
> > > find out.
> > >
> > > Ronald van Raaphorst wrote:
> > >
> > > > Hi all,
> > > >
> > > > Not a real bug, but a suggestion:
> > > > It would be nice if inifite recursive calls would somehow give an
error.
> > > > I spend quite some time to find the error in my php script.
> > > >
> > > > Ronald
> > > >
> >
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to