From: Andrei Zmievski Date: Tue, 1 Aug 2006 22:28:26 +0000 (+0000) Subject: Add SORT_LOCALE_STRING support to array_multisort() and mark it with U. X-Git-Tag: RELEASE_1_0_0RC1~2139 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b67e1d9f92a7b77f0f9f22f734c532c74e022e7b;p=php Add SORT_LOCALE_STRING support to array_multisort() and mark it with U. --- diff --git a/ext/standard/array.c b/ext/standard/array.c index 29aa750475..04aa5a29e6 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -3693,7 +3693,7 @@ int multisort_compare(const void *a, const void *b TSRMLS_DC) efree(args); \ RETURN_FALSE; -/* {{{ proto bool array_multisort(array ar1 [, SORT_ASC|SORT_DESC [, SORT_REGULAR|SORT_NUMERIC|SORT_STRING]] [, array ar2 [, SORT_ASC|SORT_DESC [, SORT_REGULAR|SORT_NUMERIC|SORT_STRING]], ...]) +/* {{{ proto bool array_multisort(array ar1 [, SORT_ASC|SORT_DESC [, SORT_REGULAR|SORT_NUMERIC|SORT_STRING]] [, array ar2 [, SORT_ASC|SORT_DESC [, SORT_REGULAR|SORT_NUMERIC|SORT_STRING]], ...]) U Sort multiple arrays at once similar to how ORDER BY clause works in SQL */ PHP_FUNCTION(array_multisort) { @@ -3770,6 +3770,7 @@ PHP_FUNCTION(array_multisort) case SORT_REGULAR: case SORT_NUMERIC: case SORT_STRING: + case SORT_LOCALE_STRING: /* flag allowed here */ if (parse_state[MULTISORT_TYPE] == 1) { /* Save the flag and make sure then next arg is not the current flag. */ diff --git a/unicode-progress.txt b/unicode-progress.txt index 7b9203a0b7..d66c1dc722 100644 --- a/unicode-progress.txt +++ b/unicode-progress.txt @@ -10,9 +10,6 @@ ext/standard Need to fix string_compare_function() to compare Unicode strings directly in code point order - array_multisort() - Add SORT_LOCALE_STRING, test - natsort(), natcasesort() Params API Either port strnatcmp() to support Unicode or maybe use ICU's numeric collation @@ -35,6 +32,7 @@ ext/standard array_map() array_merge() array_merge_recursive() + array_multisort() array_product() array_push(), array_pop(), array_shift(), array_unshift() array_pad()