PHP 4.0 Bug #10026 Updated: For loop always execute

From: Date: Tue, 27 Mar 2001 16:09:08 +0000
Subject: PHP 4.0 Bug #10026 Updated: For loop always execute
Groups: php.dev 
Request: Send a blank email to php-dev+get-50083@lists.php.net to get a copy of this message
ID: 10026 User Update by: svein@edbc.no Status: Open Bug Type: *General Issues Description: For loop always execute The code submitted is inside a function that is called recursively and its not exact copy of the code. I've also tried to change the for loop to a while loop with the same result. Previous Comments: --------------------------------------------------------------------------- [2001-03-27 11:07:07] svein@edbc.no I have a strange situation; I have this code : $c = count($myarray); echo $c . '<br>'; for ($i=0; $i<$c; $i++) { code goes here... } echo often often output that $c is 0 BUT the for loop ALWAYS execute... I also have tried to sorrund the for loop with this : if ($c>0) { for(...) } and it STILL execute if $c==0 --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=10026

« previous php.dev (#50083) next »