PHP 4.0 Bug #2013: Infinite loop where it shouldnt be

From: Date: Mon, 09 Aug 1999 21:49:29 +0000
Subject: PHP 4.0 Bug #2013: Infinite loop where it shouldnt be
Groups: php.dev 
Request: Send a blank email to php-dev+get-9698@lists.php.net to get a copy of this message
From: sander@pilon.com Operating system: Linux 2.2 PHP version: 4.0 Beta 2 PHP Bug Type: Scripting Engine problem Bug description: Infinite loop where it shouldnt be Zeev knows about this.... this program loops, and it shouldnt as far as I can see: <script language="php"> /* * Prints a bar-quoted line. */ function bord_barquotes_printplain($line,$level,$first=true) { $len = strlen($line); $idx = $len-1; if( $line[$idx] != "\n" ) echo "\n"; return $line; } /* * Renders a complete article, with barquotes. */ function bord_renderarticle_quotebars($group,$mid,$func="bord_barquotes_print",$quote=0) { $newbody[] = "PHP4 BETA2 TEST"; echo "BEFORE LOOP: ".count($newbody)."<BR>"; for($i=0;$i<=count($newbody);$i++) { echo "DURING LOOP: ".count($newbody)."<BR>"; flush(); // flush doesnt affect it. echo $func($newbody[$i],$newlvl[$i]+$quote); } } bord_renderarticle_quotebars($gid,$mid,"bord_barquotes_printplain"); </script>

« previous php.dev (#9698) next »