PHPackages                             votemike/money - 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. votemike/money

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

votemike/money
==============

A class for dealing with Money (a combination of a value and a currency)

1.2.0(8y ago)524.9k↓16.7%1[3 issues](https://github.com/votemike/money/issues)[1 PRs](https://github.com/votemike/money/pulls)MITPHPPHP ^7CI failing

Since Jun 10Pushed 6y ago1 watchersCompare

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

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

Money
=====

[](#money)

[![Build Status](https://camo.githubusercontent.com/e914ff503c2cb509fb5c40573cadafd68d89f9403578463c25e058e4a90ba166/68747470733a2f2f7472617669732d63692e6f72672f766f74656d696b652f6d6f6e65792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/votemike/money)[![Latest Stable Version](https://camo.githubusercontent.com/396c4b95c93ffe6fe9527b87c7db528a1d507fb33ae7e3565f15c8347d210870/68747470733a2f2f706f7365722e707567782e6f72672f766f74656d696b652f6d6f6e65792f762f737461626c65)](https://packagist.org/packages/votemike/money)[![Total Downloads](https://camo.githubusercontent.com/943d78848998b9e18ca2b4ac7bcdf4f08f05352ba0789473d34a3371bde512b0/68747470733a2f2f706f7365722e707567782e6f72672f766f74656d696b652f6d6f6e65792f646f776e6c6f616473)](https://packagist.org/packages/votemike/money)[![Latest Unstable Version](https://camo.githubusercontent.com/8305d43be7eb473582629e1004851583199f5b9175f8d61bfb12eb5e9d5cb529/68747470733a2f2f706f7365722e707567782e6f72672f766f74656d696b652f6d6f6e65792f762f756e737461626c65)](https://packagist.org/packages/votemike/money)[![License](https://camo.githubusercontent.com/ee27fc3138a8e874052c68b9dfe7c3923e1f10b754dcbe454d40e86b5cfe3b5b/68747470733a2f2f706f7365722e707567782e6f72672f766f74656d696b652f6d6f6e65792f6c6963656e7365)](https://packagist.org/packages/votemike/money)[![composer.lock](https://camo.githubusercontent.com/884ddfa28d9f86a0ae2e683c3a1b34bf2f1ef06c40217321cc0e110e65d1aef8/68747470733a2f2f706f7365722e707567782e6f72672f766f74656d696b652f6d6f6e65792f636f6d706f7365726c6f636b)](https://packagist.org/packages/votemike/money)[![StyleCI](https://camo.githubusercontent.com/e62085cd53e7973ed460726865d8a623a4942d43504c0ae7978198022d6498ff/68747470733a2f2f7374796c6563692e696f2f7265706f732f35393335333135382f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/59353158)

Pass in an amount and currency to the Money object to create an immutable object. Perform actions with the object. Deals with different units/rounding of different currencies. Formats money for display Please use GitHub to raise any issues and suggest any improvements.

Install
-------

[](#install)

Via Composer

```
$ composer require votemike/money
```

Usage
-----

[](#usage)

```
$money = new Money(99.999999, 'GBP');
$add = $money->add(new Money(20, 'GBP'));
$sub = $money->sub(new Money(20, 'GBP'));
$multiply = $money->multiply(3);
$divide = $money->divide(3);
$abs = $money->abs();
$inv = $money->inv();
$percentage = $money->percentage(20);
$round = $money->round();
list($first, $second, $third) = $money->split(20, 33.33);

$money = new Money(99.50, 'JPY');
$money->format(); //¥100
$money->formatWithSign(); //+¥100
$money->getAmount(); //99.50
$money->getCurrency(); //JPY
$money->getRoundedAmount(); //100

$money = new Money(9500, 'USD');
$money->formatShorthand(); //$10k

$money = new Money(-9.500, 'USD');
$money->formatForAccounting(); //(9.50)

```

Credits
-------

[](#credits)

- [Michael Gwynne](https://votemike.co.uk)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance8

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity67

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 ~134 days

Total

5

Last Release

3091d ago

PHP version history (2 changes)1.1.1PHP ^5.6|^7

1.2.0PHP ^7

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3957065?v=4)[Michael Gwynne](/maintainers/votemike)[@votemike](https://github.com/votemike)

---

Top Contributors

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

---

Tags

moneycurrency

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/votemike-money/health.svg)

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

###  Alternatives

[brick/money

Money and currency library

1.9k37.9M102](/packages/brick-money)[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)[kwn/number-to-words

Multi language standalone PHP number to words converter. Fully tested, open for extensions and new languages.

4235.0M21](/packages/kwn-number-to-words)[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)
