PHPackages                             openbuildings/monetary - 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. openbuildings/monetary

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

openbuildings/monetary
======================

Useful tool for formatting and converting currencies

0.5.0(6y ago)10207.6k↓50%4[3 issues](https://github.com/OpenBuildings/monetary/issues)[1 PRs](https://github.com/OpenBuildings/monetary/pulls)1BSD-3-ClausePHPPHP ^7.1CI failing

Since Aug 21Pushed 6y ago11 watchersCompare

[ Source](https://github.com/OpenBuildings/monetary)[ Packagist](https://packagist.org/packages/openbuildings/monetary)[ Docs](https://github.com/OpenBuildings/monetary)[ RSS](/packages/openbuildings-monetary/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (13)Used By (1)

Monetary
========

[](#monetary)

Useful tool for formatting and converting currencies in PHP

[![Build Status](https://camo.githubusercontent.com/f343f5326d333ac9b69f8089668281e0f1c4b0ee346c67fb736ed8e74f1e262e/68747470733a2f2f7472617669732d63692e6f72672f4f70656e4275696c64696e67732f6d6f6e65746172792e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/OpenBuildings/monetary)[![Latest Stable Version](https://camo.githubusercontent.com/5b1c5478272704184378dc27d0656a40c98b11776e5d2bdbecd377a6ecebe988/68747470733a2f2f706f7365722e707567782e6f72672f6f70656e6275696c64696e67732f6d6f6e65746172792f762f737461626c652e706e67)](https://packagist.org/packages/openbuildings/monetary)

---

The main features are:

- formatting an amount in a certain currency;
- converting an amount from one currency to another.

The Monetary library takes care of fetching exchange rates from remote services and caching them.

You can easily use your own exchange rates source or cache solution.

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

[](#installation)

Install via [Composer](http://getcomposer.org)

```
composer require openbuildings/monetary
```

Basic Usage
-----------

[](#basic-usage)

Use the namespace:

```
use OpenBuildings\Monetary\Monetary;
```

then just convert and format currencies:

```
echo Monetary::instance()->convert(10, 'USD', 'GBP');
// 7.5091987684914

echo Monetary::instance()->format(15.3, 'GBP');
// £15.30
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.2% 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 ~237 days

Recently: every ~593 days

Total

11

Last Release

2277d ago

PHP version history (2 changes)0.1.0PHP &gt;=5.3.0

0.5.0PHP ^7.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/506129?v=4)[Harry Dobrev](/maintainers/hkdobrev)[@hkdobrev](https://github.com/hkdobrev)

![](https://avatars.githubusercontent.com/u/4113307?v=4)[Danail Kyosev](/maintainers/dkyosev)[@dkyosev](https://github.com/dkyosev)

![](https://avatars.githubusercontent.com/u/7592650?v=4)[Evstati Zarkov](/maintainers/EZarkov)[@EZarkov](https://github.com/EZarkov)

![](https://avatars.githubusercontent.com/u/745771?v=4)[Filip Georgiev](/maintainers/phgeorgiev)[@phgeorgiev](https://github.com/phgeorgiev)

![](https://avatars.githubusercontent.com/u/490439?v=4)[Zdravko Evstatiev](/maintainers/zedevs)[@zedevs](https://github.com/zedevs)

---

Top Contributors

[![hkdobrev](https://avatars.githubusercontent.com/u/506129?v=4)](https://github.com/hkdobrev "hkdobrev (34 commits)")[![bozhidargyurov](https://avatars.githubusercontent.com/u/36644891?v=4)](https://github.com/bozhidargyurov "bozhidargyurov (4 commits)")[![ivank](https://avatars.githubusercontent.com/u/4976?v=4)](https://github.com/ivank "ivank (1 commits)")

---

Tags

moneyconversionexchangecurrenciesyahoomonetaryECB

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/openbuildings-monetary/health.svg)

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

###  Alternatives

[florianv/swap

Exchange rates library for PHP

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

Currency exchange rates library for Laravel and Lumen

3342.0M2](/packages/florianv-laravel-swap)

PHPackages © 2026

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