This function does not require the PHP intl extension to be installed
to work, but it is highly recommended to install it to get good formatting results.
public asCurrency ( mixed $value, string $currency = null, array $options = [], array $textOptions = [] ) : string | ||
$value | mixed | the value to be formatted. |
$currency | string | the 3-letter ISO 4217 currency code indicating the currency to use. If null, [[currencyCode]] will be used. |
$options | array | optional configuration for the number formatter. This parameter will be merged with [[numberFormatterOptions]]. |
$textOptions | array | optional configuration for the number formatter. This parameter will be merged with [[numberFormatterTextOptions]]. |
return | string | the formatted result. |