static NumberFormatter create(string $locale = 'en', int $style = null, string $pattern = null)
Static constructor.
static NumberFormatter create(string $locale = 'en', int $style = null, string $pattern = null)
Static constructor.
string | $locale | The locale code. The only supported locale is "en" (or null using the default locale, i.e. "en") |
int | $style | Style of the formatting, one of the format style constants The only currently supported styles are NumberFormatter::DECIMAL and NumberFormatter::CURRENCY. |
string | $pattern | Not supported. A pattern string in case $style is NumberFormat::PATTERNDECIMAL or NumberFormat::PATTERNRULEBASED. It must conform to the syntax described in the ICU DecimalFormat or ICU RuleBasedNumberFormat documentation |
NumberFormatter |
MethodArgumentValueNotImplementedException | When $locale different than "en" or null is passed |
MethodArgumentValueNotImplementedException | When the $style is not supported |
MethodArgumentNotImplementedException | When the pattern value is different than null |
http://www.php.net/manual/en/numberformatter.create.php | |
http://www.icu-project.org/apiref/icu4c/classDecimalFormat.html#_details | |
http://www.icu-project.org/apiref/icu4c/classRuleBasedNumberFormat.html#_details |
Designed by : w10schools
service@w10schools.com
Please login to continue.