Collator::create
collator_create
(PHP 5 >= 5.3.0, PHP 7, PECL intl >= 1.0.0)
Collator::create -- collator_create — Create a collator
Описание
Объектно-ориентированный стиль
Процедурный стиль
The strings will be compared using the options already specified.
Список параметров
-
locale
-
The locale containing the required collation rules. Special values for locales can be passed in - if null is passed for the locale, the default locale collation rules will be used. If empty string ("") or "root" are passed, » UCA rules will be used.
Возвращаемые значения
Return new instance of Collator object, or NULL
on error.
Примеры
Пример #1 collator_create() example
<?php
$coll = collator_create( 'en_US' );
if( !isset( $coll ) ) {
printf( "Collator creation failed: %s\n", intl_get_error_message() );
exit( 1 );
}
?>
- 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