PHPackages                             mibo/currencies - 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. mibo/currencies

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

mibo/currencies
===============

PHP Library of ISO-4217 standard

1.2.2(1y ago)015.7k↓34.6%2MITPHPPHP ^8.2CI passing

Since May 4Pushed 1y ago2 watchersCompare

[ Source](https://github.com/4513/currencies)[ Packagist](https://packagist.org/packages/mibo/currencies)[ RSS](/packages/mibo-currencies/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (9)Used By (2)

Currencies
==========

[](#currencies)

[![codecov](https://camo.githubusercontent.com/c16675928d087e6336a128f7984d6f4482e149dc5d742706b77d641e4917cda0/68747470733a2f2f636f6465636f762e696f2f67682f343531332f63757272656e636965732f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d4b475336494145575538)](https://codecov.io/gh/4513/currencies)

Based on ISO-4217

Implementation
--------------

[](#implementation)

```
composer require mibo/currencies
```

Usage
-----

[](#usage)

To find a currency:

```
$factory = new \MiBo\Engine\Utils\Currencies\ISO\ISOCurrencyProvider();

// Get By Alphabetic Code ("EUR")
$currency = $factory->findByAlphabeticalCode("EUR");

// Get By Numerical Code ("012")
$currency = $factory->findByNumericalCode("123");

// Get By Country Name
// Returns an array of currencies
$currencies = $factory->findByCountry("CZECHIA");
```

To change list of available currencies to

- add custom currencies;
- allow only some currencies;
- change currencies' data the list(s) can be overwritten:

```
$factory->getLoader()->setResources(\MiBo\Engine\Utils\Currencies\ISO\ISOListLoader::SOURCE_LOCAL);
```

### Find by country

[](#find-by-country)

One should try to avoid looking for a currency by a country.
While other functions stops looping through lists when the needed currency is found, the `getCurrencyByCountry` function keeps looking for currency until the end of last file in list. This might prolong the process when one knows that a country uses only one currency and knows a code of the currency.

Currency Class
--------------

[](#currency-class)

```
$currency = new \MiBo\Engine\Utils\Currencies\ISO\ISOCurrency(/*...*/);

$currency->getAlphabeticalCode(); // "EUR"
$currency->getNumericalCode(); // "978"
$currency->getName(); // "Euro"
$currency->getMinorUnitRate(); // 2|null
```

### Minor Unit Rate

[](#minor-unit-rate)

Is used to specify, how many digits there are for the currency after decimal point.
Few of the currencies do not have a minor unit.
An example for minor unit can be "cent" for "Euro".

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~78 days

Recently: every ~119 days

Total

8

Last Release

562d ago

PHP version history (3 changes)1.0.0PHP ^8.0

1.2.0PHP ^8.1

1.2.1PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/0866c3280ed62cfc74feb086241ec9ee56bab89b4fa2b8c8a3dbd62508761b6a?d=identicon)[MiBo](/maintainers/MiBo)

---

Top Contributors

[![4513](https://avatars.githubusercontent.com/u/25705559?v=4)](https://github.com/4513 "4513 (27 commits)")

---

Tags

phpmoneycurrencypackagelibraryisocurrenciesISO 4217libMiBo

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mibo-currencies/health.svg)

```
[![Health](https://phpackages.com/badges/mibo-currencies/health.svg)](https://phpackages.com/packages/mibo-currencies)
```

###  Alternatives

[payum/iso4217

ISO 4217 PHP Library

16312.1M5](/packages/payum-iso4217)[cartalyst/converter

A framework agnostic measurement conversion and formatting package featuring multiple types of measurements and currency conversion.

88434.4k7](/packages/cartalyst-converter)[niiknow/bayes

a machine learning lib

6950.0k](/packages/niiknow-bayes)[wujunze/money-wrapper

MoneyPHP Wrapper

113.8k](/packages/wujunze-money-wrapper)

PHPackages © 2026

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