| Recommend this page to a friend! | 
|  Download | 
| Info | Documentation |  Files |  Install with Composer |  Download | Reputation | Support forum | Blog | Links | 
| Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
| 2025-06-03 (-4 hours ago)  | Not enough user ratings | Total: 163 | All time:  8,933 This week: 68  | |||||
| Version | License | PHP version | Categories | |||
| currency-util 1.0.1 | 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.
|  Files (8) | 
| File | Role | Description | ||
|---|---|---|---|---|
|  src (2 files) | ||||
|  tests (1 file) | ||||
|    composer.json | Data | Auxiliary data | ||
|    composer.lock | Data | Auxiliary data | ||
|    LICENCE.md | Lic. | License text | ||
|    phpunit.xml | Data | Auxiliary data | ||
|    README.md | Doc. | Documentation | ||
|  Files (8) | / | src | 
| File | Role | Description | 
|---|---|---|
|  CurrencySymbolMapping.php | Class | Class source | 
|  CurrencySymbolUtil.php | Class | Class source | 
| The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. | 
|  Install with Composer | 
| 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.
 If you know an application of this package, send a message to the author to add a link here.