ID: 28139
Updated by: [EMAIL PROTECTED]
Reported By: a-dead-trousers at aon dot at
Status: Bogus
-Bug Type: Feature/Change Request
+Bug Type: Reproducible crash
Operating System: winxp
PHP Version: Irrelevant
New Comment:
Yup, recursion works fine, infinite recursion doesnt.
Previous Comments:
------------------------------------------------------------------------
[2004-04-24 23:20:11] a-dead-trousers at aon dot at
Shit...
Now i found out what i have done wrong...
Sorry, for having posted such an stupid bug.
----------
echo '1000 times sorry:'
function countdown($var) {
$var--;
if ($var > 0) countdown($var);
echo ' sorry,';
}
countdown(1000);
----------
------------------------------------------------------------------------
[2004-04-24 22:58:03] [EMAIL PROTECTED]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php
.
------------------------------------------------------------------------
[2004-04-24 22:56:25] a-dead-trousers at aon dot at
Description:
------------
I'm wondering about PHP not supporting recursive function calls. (I
read bug report #2004 --> PHP does not support recursive function calls
at all)
I don't know if this feature can be implemented easily (seems to go
down to zend engine) but it would be fantastic if it could be
implemented.
Reproduce code:
---------------
function countdown($var) {
$var--;
countdown($var);
echo $var;
}
countdown(10);
//tested with PHP 4.3.2 (Zend Studio)
//and PHP 5.0.0 RC1 (Apache)
//on Win XP (Probably a win only problem)
Expected result:
----------------
9 8 7 6 5 4 3 2 1
Actual result:
--------------
Nothing!
PHP dose not crash!!!
The browser reports "Document contains no data"
Neither the log file of the webserver nor the php logfile reports
anything.
If this feature can't be implemented it would be fantastic if PHP could
show an errormessage or something similar e.g. logfileentry (even if it
crashes would be better than doing nothing ;) )
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28139&edit=1