From fb32b71aef291bb4c0f4ff8c481eb56ff0b736be Mon Sep 17 00:00:00 2001 From: Kalle Sommer Nielsen Date: Sat, 13 Dec 2008 05:32:05 +0000 Subject: [PATCH] Document new sort_flags parameter for array_unique() in 5.2.9 git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@271119 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/array/functions/array-unique.xml | 64 +++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/reference/array/functions/array-unique.xml b/reference/array/functions/array-unique.xml index d4929b4aae..d8eecb0114 100644 --- a/reference/array/functions/array-unique.xml +++ b/reference/array/functions/array-unique.xml @@ -1,15 +1,17 @@ - + array_unique Removes duplicate values from an array + &reftitle.description; arrayarray_unique arrayarray + intsort_flags Takes an input array and returns a new array @@ -33,6 +35,7 @@ + &reftitle.parameters; @@ -45,15 +48,73 @@ + + sort_flags + + + The optional second parameter sort_flags + may be used to modify the sorting behavior using these values: + + + Sorting type flags: + + + SORT_REGULAR - compare items normally + (don't change types) + + + SORT_NUMERIC - compare items numerically + + + SORT_STRING - compare items as strings + + + SORT_LOCALE_STRING - compare items as + strings, based on the current locale. Added in PHP 4.4.0 and 5.0.2. + Before PHP 6, it uses the system locale, which can be changed using + setlocale. Since PHP 6, you must use the + i18n_loc_set_default function. + + + + + + + &reftitle.returnvalues; Returns the filtered array. + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 5.2.9 + + Added the optional sort_flags. + + + + + + + + &reftitle.examples; @@ -105,6 +166,7 @@ array(2) { +