|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-04-30 08:26 UTC] jani@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 06:00:01 2025 UTC |
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: --------------- jablko@tad:~/php5.2-200904292030$ sapi/cli/php -r 'var_dump(array_unique(array("foo", 0)));' array(1) { [0]=> string(3) "foo" } jablko@tad:~/php5.2-200904292030$ Expected result: ---------------- array(2) { [0]=> string(3) "foo" [1]=> int(0) } Actual result: -------------- array(1) { [0]=> string(3) "foo" }