php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44883 Endless Recursion Ends quickly, throws no error
Submitted: 2008-05-01 18:36 UTC Modified: 2008-05-03 03:42 UTC
Votes:2
Avg. Score:4.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: kevin at creativeanvil dot com Assigned:
Status: Wont fix Package: Scripting Engine problem
PHP Version: 5.2.5 OS: RHEL 4x
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 — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
50 + 39 = ?
Subscribe to this entry?

 
 [2008-05-01 18:36 UTC] kevin at creativeanvil dot com
Description:
------------
Basically my script was ending in the middle and output at the end of the script was not outputted.  This was due to a coding error, however I believe a PHP error should have been thrown because PHP terminated the request at some point.  It was a stupid mistake, however not the easiest to track down.

The code isn't my actual code, but it will reproduce what I think is a problem.

Reproduce code:
---------------
<?php
$c=0;
function recursiveTest() {
	global $c;
	echo $c++."<br>";
	recursiveTest();
}
recursiveTest();
?>

Expected result:
----------------
I would expect it to go on until memory limit is reached, throwing an error, max execution time reached, throwing an error, or something that throws an error.

In my environment it gets to 19456 and stops everytime, no error is given and it stops very quicky.

ENDLESS RECURSION ERROR.

Some kind of error.

Actual result:
--------------
1
2
3
....
19456

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-05-03 03:42 UTC] felipe@php.net
Bug #29242
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 21:01:30 2024 UTC