|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-04-24 22:56 UTC] 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 ;) )
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 13:00:01 2025 UTC |
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); ----------