Примеры
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
<?php
$coll = collator_create('en_US');
$result = collator_compare($coll, "string#1", "string#2");
?>
Пример #2 Example of using the object-oriented API
<?php
$coll = new Collator('en_US');
$al = $coll->getLocaleByType(Locale::ACTUAL_LOCALE);
echo "Actual locale: $al\n";
$formatter = new NumberFormatter('en_US', NumberFormatter::DECIMAL);
echo $formatter->format(1234567);
?>
- PHP Руководство
- Функции по категориям
- Индекс функций
- Справочник функций
- Поддержка языков и кодировок
- Введение
- Установка и настройка
- Предопределенные константы
- Примеры
- The Collator class
- The NumberFormatter class
- The Locale class
- The Normalizer class
- The MessageFormatter class
- The IntlCalendar class
- The IntlTimeZone class
- The IntlDateFormatter class
- The ResourceBundle class
- The Spoofchecker class
- The Transliterator class
- The IntlBreakIterator class
- The IntlRuleBasedBreakIterator class
- The IntlCodePointBreakIterator class
- The IntlPartsIterator class
- The UConverter class
- Grapheme Функции
- IDN Функции
- IntlChar
- Exception class for intl errors
- The IntlIterator class
- intl Функции
Коментарии
404 Not Found