php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #54566
Patch fix_recursive_function revision 2011-04-19 00:21 UTC by paridin at paridin dot com

Patch fix_recursive_function for Output Control Bug #54566

Patch version 2011-04-19 00:21 UTC

Return to Bug #54566 | Download this patch
Patch Revisions:

Developer: paridin@paridin.com

--- bug.txt	2011-04-18 19:18:59.869024981 -0500
+++ modified.txt	2011-04-18 19:17:51.349024980 -0500
@@ -1,13 +1,15 @@
-<?php
+
 function foo($i){
 if( $i < 100){
    echo " ".$i;
-   return foo($i++);//bug
+   // fix bug
+   $i++;
+   return foo($i);
 }else{
   return $m="\r\nEnd Process";
 }
 }
 $i=0;
 echo foo($i);
-?>
+
 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jul 25 19:01:29 2024 UTC