#22863 [Opn->Ver]: array_diff works differently than expected
| From: | nicos@php.net | Date: | Tue, 25 Mar 2003 01:04:57 +0000 |
| Subject: | #22863 [Opn->Ver]: array_diff works differently than expected | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-36353@lists.php.net to get a copy of this message | ||
ID: 22863
Updated by: nicos@php.net
Reported By: pieter3d at hotmail dot com
-Status: Open
+Status: Verified
Bug Type: Arrays related
Operating System: WinXP
PHP Version: 4.3.1
New Comment:
Verified with PHP-4.3.2RC1 (UNIX and Windows NT).
Previous Comments:
------------------------------------------------------------------------
[2003-03-24 18:59:41] pieter3d at hotmail dot com
When executing this code:
$a = array(1,2,3,4,5,6,7,8,9);
$b = array(3,4,5);
$test=array_diff($a,$b);
$i=0;
while($test[$i])
{
echo "$test[$i]<br>";
$i++;
}
the result is:
1
2
The expected result of course is
1
2
6
7
8
9
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22863&edit=1