Bug #4159: Wrong count array after unset()

From: Date: Sun, 16 Apr 2000 16:05:28 +0000
Subject: Bug #4159: Wrong count array after unset()
Groups: php.dev 
Request: Send a blank email to php-dev+get-17952@lists.php.net to get a copy of this message
From: cbob@builder.cz Operating system: Linux RH, PHP version: 3.0 Latest CVS (16/04/2000) PHP Bug Type: Other Bug description: Wrong count array after unset() Test script: ------------ $x=array(1,2,3,4,5,6,7,8); for($i=0; $i<count($x); $i++) echo $x[$i]."<br>\n"; unset($x[2]); echo "<hr>"; for($i=0; $i<count($x); $i++) echo $x[$i]."<br>\n"; Output: 1 2 3 4 5 6 7 8 ------------------------------------------------------------ 1 2 4 5 6 7 but I thing, that it may be: 1 2 4 5 6 7 8 ????? It test it under: PHP-3.0.12 and PHP-4.0b1 and it is the same....

« previous php.dev (#17952) next »