PHPackages                             terdia/currency-util - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. terdia/currency-util

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

terdia/currency-util
====================

A simple library to lookup the currency symbol for a given currency code.

v1.0.1(4y ago)9109.3k↓16.2%1[1 issues](https://github.com/terdia/currency-util/issues)MITPHPPHP &gt;=7.1

Since Aug 31Pushed 4y ago1 watchersCompare

[ Source](https://github.com/terdia/currency-util)[ Packagist](https://packagist.org/packages/terdia/currency-util)[ RSS](/packages/terdia-currency-util/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

php currency-util
=================

[](#php-currency-util)

A simple library to lookup the currency symbol for a given currency code.

Installation
------------

[](#installation)

```
composer req terdia/currency-util
```

Usage
-----

[](#usage)

### Get symbol from currency code

[](#get-symbol-from-currency-code)

```
use Currency\Util\CurrencySymbolUtil;

CurrencySymbolUtil::getSymbol('GBP') //=> '£'
CurrencySymbolUtil::getSymbol('EUR') //=> '€'
CurrencySymbolUtil::getSymbol('USD') //=> '$'
CurrencySymbolUtil::getSymbol('NOT A VALID CODE') throw InvalidArgumentException
```

### Get List of supported currency code

[](#get-list-of-supported--currency-code)

```
use Currency\Util\CurrencySymbolMapping;

var_dump(CurrencySymbolMapping::values())
// =>
[
 "USD" => "$",
 "GBP" => "£",
 "EUR" => "€",
 …
]
```

Tests
-----

[](#tests)

```
vendor/bin/phpunit tests
```

Contribution
------------

[](#contribution)

Feel free to contribute to this library.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~931 days

Total

2

Last Release

1520d ago

PHP version history (2 changes)v1.0.0PHP &gt;=7.0

v1.0.1PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/99f00555cffe5de665c5caab0782171a69a6d513936e65da651e1c8e81c47c9e?d=identicon)[terdia](/maintainers/terdia)

---

Top Contributors

[![terdia](https://avatars.githubusercontent.com/u/4749721?v=4)](https://github.com/terdia "terdia (3 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")

---

Tags

currencymappingphp currency map

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/terdia-currency-util/health.svg)

```
[![Health](https://phpackages.com/badges/terdia-currency-util/health.svg)](https://phpackages.com/packages/terdia-currency-util)
```

###  Alternatives

[brick/money

Money and currency library

1.9k37.9M102](/packages/brick-money)[cuyz/valinor

Dependency free PHP library that helps to map any input into a strongly-typed structure.

1.5k9.2M108](/packages/cuyz-valinor)[florianv/swap

Exchange rates library for PHP

1.3k6.4M16](/packages/florianv-swap)[cknow/laravel-money

Laravel Money

1.0k4.3M22](/packages/cknow-laravel-money)[akaunting/laravel-money

Currency formatting and conversion package for Laravel

7825.3M18](/packages/akaunting-laravel-money)[webpatser/laravel-countries

Modern Laravel Countries package providing ISO 3166-2, ISO 3166-3, currency, capital and more for all countries. Compatible with Laravel 11.x and 12.x.

8272.8M8](/packages/webpatser-laravel-countries)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
