From: a-dead-trousers at aon dot at Operating system: winxp PHP version: Irrelevant PHP Bug Type: Feature/Change Request Bug description: Recursive function call?
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 bug report at http://bugs.php.net/?id=28139&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28139&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28139&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28139&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28139&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28139&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28139&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28139&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28139&r=support Expected behavior: http://bugs.php.net/fix.php?id=28139&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28139&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28139&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28139&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28139&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28139&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28139&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28139&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28139&r=float