On Fri, 26 Oct 2007 16:12:25 +0200, Jochem Maas <[EMAIL PROTECTED]> wrote: > T.Lensselink wrote: >> >> On Fri, 26 Oct 2007 14:32:42 +0200, Jochem Maas <[EMAIL PROTECTED]> >> wrote: >>> Paul Scott wrote: >>>> On Fri, 2007-10-26 at 12:52 +0200, Jochem Maas wrote: >>>> >>>>> since when is there an arbitrary maximum recursion limit??? >>>> Since forever... ;) >>> thats you think, personally I test this kind of thing when Im >>> not sure: >>> > > php -r 'function foo() { static $x = 1; echo "foo ", $x++, "\n"; foo(); } > foo();' > > ... > >> >> Running your code shows that there is a limit. Although it doesn't throw > an >> error. >> It just stops after n recursive calls: >> >> php4 recursive calls: 796 >> php5 recursive calls: 49841 >> php6 recursive calls: 6007 > > A. this is not the output of the script
That's true. i never said it was... or did i? > > B. do you think these numbers are the same for everyone? > heck they're not even garanteed to be the same between 2 runs > on the same machine with the same php binary. No i don't think it will be the same on all systems. I also didn't say that. You make to much assumptions. > > C. it doesn't just stop, a segmentation fault occurs. No it doesn't segfault. Well atleast it doesn't here. error_reporting on. Xdebug enabled... No segfaults.. It just stops after (n) recursions. > > e.g.: > > last 2 lines of output for 4.3.10-19: > > foo 11137 > foo Segmentatie fout > > last 2 lines of output for 4.3.10-19: > > foo 11147 > foo Segmentatie fout > > last 2 lines of output for 5.1.1: > > foo 37435 > foo Segmentation fault > > last 2 lines of output for 5.1.1: > > foo 37436 > foo Segmentation fault > > last 2 lines of output for 5.1.2: > > foo 30795 > foo Segmentatie fout > > last 2 lines of output for 5.1.2: > > foo 30787 > foo Segmentatie fout > > > Therfore there is NO recursion limit in php (not withstanding a specific > limit > in functions belonging to an XML extention). the percieved limit is php > running > out of memory ... as long as there is memory php will continue to recurse. I didn't say there is a recursion limit. I just confirmed the output of running your "test" script. > > -- > 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