|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-12-29 22:39 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 07:00:02 2025 UTC |
Description: ------------ F:\>php -v PHP 5.0.3 (cli) (built: Dec 15 2004 08:07:57) Infinite recursion is predictably terminated, but the Zend Engine produces no output to that effect (at least in CLI). At least a E_WARNING should be emitted to warn developers that this is really what happened (as it might not be clear). Reproduce code: --------------- <?php /* php/bugs/recursive.php5 * Infinite recursion protection needs error */ $i = 0; function iWillRecurse() { global $i; printf("Recursions: %7s\n", number_format(++$i)); iWillRecurse(); } iWillRecurse(); Expected result: ---------------- F:\>php -f php\bugs\recursive.php5 .. Recursions: 6,283 Recursions: 6,284 Warning: Infinite recursion in F:\php\bugs\recursive.php5 on line 10 F:\> Actual result: -------------- F:\>php -f php\bugs\recursive.php5 .. Recursions: 6,283 Recursions: 6,284 F:\>