Наш чат в Telegram для обмена идеями, проектами, мыслями, людьми в сфере ИТ г.Ростова-на-Дону: @it_rostov

Basic usage of this extension

Each module provides two kind of APIs: a procedural one and an object oriented one. Both are actually identical and described in the corresponding document.


All input strings must be in UTF-8 encoding. All output strings are also in UTF-8.

Пример #1 Example of using the procedural API
$coll  = collator_create('en_US');
$result = collator_compare($coll, "string#1", "string#2");

Пример #2 Example of using the object-oriented API
$coll = new Collator('en_US');
$al   = $coll->getLocale(Locale::ACTUAL_LOCALE);
echo "Actual locale: $al\n";
$formatter = new NumberFormatter('en_US', NumberFormatter::DECIMAL);
echo $formatter->format(1234567);

Смотрите также:
Описание на ru2.php.net
Описание на php.ru