php.net |  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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: gregori at datanetms dot co dot uk
New email:
PHP Version: OS:

 

 [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 :

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

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


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 ...

gregori

Patches

Pull Requests

History

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: Thu Oct 03 20:01:28 2024 UTC