Search Results
Parameters ¶ object Collator object. array Array of strings to sort. flags Optional sorting type, one of the following: Collator::SORT_REGULAR - compare items normally (don't change types) Collator::SORT_NUMERIC - compare items numerically Collator::SORT_STRING - compare items as strings Default flags value is Collator::SORT_REGULAR. It is also used if an invalid flags value has been specified.
Jul 11, 2025 · The collator_asort () function is an inbuilt function in PHP which is used to sort array maintaining the index association. This function sorts an array such that array indices maintain their correlation with the array elements they are associated with.
Cette fonction trie un tableau en maintenant l'association entre les clés et les valeurs. Elle sert surtout à trier des tableaux associatifs, où l'ordre des éléments est important. Les éléments seront triés en fonction des conventions locales. Équivalent de la fonction PHP standard asort ().
This function sorts an array such that array indices maintain their correlation with the array elements they are associated with. This is used mainly when sorting associative arrays where the actual element order is significant. Array elements will have sort order according to current locale rules. Equivalent to standard PHP asort ().
Collator::CASE_FIRST (integer) The Case_First attribute is used to control whether uppercase letters come before lowercase letters or vice versa, in the absence of other differences in the strings.
« Basic usage of this extension Collator::asort » PHP Manual intl The Collator class
The Collator class Introduction (PHP 5 >= 5.3.0, PHP 7, PECL intl >= 1.0.0) Provides string comparison capability with support for appropriate locale-sensitive sort orderings. Class synopsis
