|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1901 recursive call limitation
Submitted: 1999-07-28 06:11 UTC Modified: 1999-08-07 12:25 UTC
From: gregori at datanetms dot co dot uk Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 4.0 Beta 1 OS: linux (RedHat 6)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
49 - 6 = ?
Subscribe to this entry?

 [1999-07-28 06:11 UTC] gregori at datanetms dot co dot uk
I guess that it's not a common thing that we are supposed to do with a script language but I think it's important to let you know ...

netscape 4.6 gave me "the document contained no data ..." with this script :

<body bgcolor="#ffffff" text="#000088">
function nothing($val) {
  if ($val <=0 ) return(0);
  nothing($val - 1);

echo "<br>simple function ... ";
echo "<br>recursive function ... ";
$debut = time();
$end = time();
echo "<center>Execution time : ".($end - $debut)."</center>";

Note : the script works fine with nothing(8191) or a smaller value. 
Note2: C++ support a such number of recursive call.

Is it important ?! I really dunno ...



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1999-08-07 12:25 UTC] zeev at cvs dot php dot net
PHP 4.0 (Zend) uses the stack for intensive data, rather than using
the heap.  That means that its tolerance recursive functions
is significantly lower than that of other languages.

It's relatively easy to tell Zend not to use the stack for this
data, and use the heap instead - which would greatly increase the
number of recursive functions possible - in the price of reduced
speed.  If you're interested in such a setting, let me know, we
may add a compile-time switch.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Feb 27 14:01:32 2024 UTC