#31338 [Opn->WFx]: Infinite recursion protection needs error
| From: | derick@php.net | Date: | Wed, 29 Dec 2004 21:39:37 +0000 |
| Subject: | #31338 [Opn->WFx]: Infinite recursion protection needs error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-71254@lists.php.net to get a copy of this message | ||
ID: 31338
Updated by: derick@php.net
Reported By: jed@php.net
-Status: Open
+Status: Wont fix
Bug Type: Feature/Change Request
Operating System: Windows XP SP2
PHP Version: 5.0.3
New Comment:
This was requested before, and this can NOT be done in a nice way.
Previous Comments:
------------------------------------------------------------------------
[2004-12-29 21:53:36] jed@php.net
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:\>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31338&edit=1