ID: 48115
Updated by: [email protected]
Reported By: ms419 at freezone dot co dot uk
-Status: Open
+Status: Bogus
Bug Type: Arrays related
Operating System: Debian
PHP Version: 5.2CVS-2009-04-29 (snap)
New Comment:
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same.
Thank you for your interest in PHP.
See bug #47370
Previous Comments:
------------------------------------------------------------------------
[2009-04-29 21:50:36] ms419 at freezone dot co dot uk
Description:
------------
array_unique() on an array with strings and the value int(0) drops
int(0)
or if int(0) comes first, it drops the first string
Reproduce code:
---------------
jab...@tad:~/php5.2-200904292030$ sapi/cli/php -r
'var_dump(array_unique(array("foo", 0)));'
array(1) {
[0]=>
string(3) "foo"
}
jab...@tad:~/php5.2-200904292030$
Expected result:
----------------
array(2) {
[0]=>
string(3) "foo"
[1]=>
int(0)
}
Actual result:
--------------
array(1) {
[0]=>
string(3) "foo"
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48115&edit=1