Recommend this page to a friend! |
![]() |
Info | Documentation | ![]() |
![]() |
![]() |
Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not enough user ratings | Total: 163 | All time: 8,933 This week: 68![]() |
Version | License | PHP version | Categories | |||
currency-util 1.0.0 | MIT/X Consortium ... | 5 | PHP 5, Finances |
A simple library to lookup the currency symbol for a given currency code.
composer req terdia/currency-util
use Currency\Util\CurrencySymbolUtil;
CurrencySymbolUtil::getSymbol('GBP') //=> '£'
CurrencySymbolUtil::getSymbol('EUR') //=> '?'
CurrencySymbolUtil::getSymbol('USD') //=> '$'
CurrencySymbolUtil::getSymbol('NOT A VALID CODE') throw InvalidArgumentException
use Currency\Util\CurrencySymbolMapping;
var_dump(CurrencySymbolMapping::values())
// =>
[
"USD" => "$",
"GBP" => "£",
"EUR" => "?",
?
]
vendor/bin/phpunit tests
Feel free to contribute to this library.
![]() |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
||||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Lic. | License text | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Doc. | Documentation |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
![]() |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.