Collator::sortWithSortKeys
collator_sort_with_sort_keys
(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
Collator::sortWithSortKeys -- collator_sort_with_sort_keys — Sort array using specified collator and sort keys
Description
Object oriented style
public
bool
Collator::sortWithSortKeys
( array
&$arr
)Procedural style
Similar to collator_sort() but uses ICU sorting keys produced by ucol_getSortKey() to gain more speed on large arrays.
Return Values
Returns TRUE
on success or FALSE
on failure.
Examples
Example #1 collator_sort_with_sort_keys() example
<?php
$arr = array( 'Köpfe', 'Kypper', 'Kopfe' );
$coll = collator_create( 'sv' );
collator_sort_with_sort_keys( $coll, $arr );
var_export( $arr );
?>
The above example will output:
array ( 0 => 'Kopfe', 1 => 'Kypper', 2 => 'Köpfe', )
See Also
- Collator constants
- collator_sort() - Sort array using specified collator
- collator_asort() - Sort array maintaining index association
- PHP Руководство
- Функции по категориям
- Индекс функций
- Справочник функций
- Поддержка языков и кодировок
- Internationalization Functions
- Функция Collator::asort() - Sort array maintaining index association
- Функция Collator::compare() - Compare two Unicode strings
- Функция Collator::__construct() - Create a collator
- Функция Collator::create() - Create a collator
- Функция Collator::getAttribute() - Get collation attribute value
- Функция Collator::getErrorCode() - Get collator's last error code
- Функция Collator::getErrorMessage() - Get text for collator's last error code
- Функция Collator::getLocale() - Get the locale name of the collator
- Функция Collator::getSortKey() - Get sorting key for a string
- Функция Collator::getStrength() - Get current collation strength
- Функция Collator::setAttribute() - Set collation attribute
- Функция Collator::setStrength() - Set collation strength
- Функция Collator::sortWithSortKeys() - Sort array using specified collator and sort keys
- Функция Collator::sort() - Sort array using specified collator
Коментарии
404 Not Found