From b210b056cdbfb8e12ca9c5df8f64e546fb5def57 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 1 Aug 2017 15:30:27 +0000 Subject: [PATCH] Update array_unique() documentation wrt https://github.com/php/php-src/commit/7853832234eec5c9111c8c13187ec048a026e852 git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@342752 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/array/functions/array-unique.xml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/reference/array/functions/array-unique.xml b/reference/array/functions/array-unique.xml index ab0155e457..67a57c4b56 100644 --- a/reference/array/functions/array-unique.xml +++ b/reference/array/functions/array-unique.xml @@ -18,11 +18,9 @@ without duplicate values. - Note that keys are preserved. array_unique sorts - the values treated as string at first, then will keep the first key - encountered for every value, and ignore all following keys. It does not - mean that the key of the first related value from the unsorted - array will be kept. + Note that keys are preserved. If multiple elements compare equal under + the given sort_flags, then the key and value of + the first equal element will be retained.