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

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

maxlzp/money
============

Php implementation of Money entity

03PHPCI failing

Since Aug 14Pushed 5y agoCompare

[ Source](https://github.com/MaxLZp/MoneyPhp)[ Packagist](https://packagist.org/packages/maxlzp/money)[ RSS](/packages/maxlzp-money/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Money
=====

[](#money)

### Create

[](#create)

```
$fiveCents = Money::USD(5);
$oneEuro = Money::EUR(100);
```

### Reset supported currencies

[](#reset-supported-currencies)

Create a class implementing CurrenciesSourceInterface:

```
class UpdatedCurrenciesSource implements CurrenciesSourceInterface
{
    protected $data = [
            'USD' => [
                'name' => 'US Dollar',
                'isoCode' => '840',
            ],
        ];

    /**
     * Return CurrencyDto. Possibly from some storage/
     * @param string $currencyCode
     * @return CurrencyDto
     * @throws CurrencyUnsupportedException
     */
    public function getWithCode(string $currencyCode): CurrencyDto
    {
        if (\array_key_exists($currencyCode, $this->data))
        {
            return new CurrencyDto(
                $currencyCode,
                $this->data[$currencyCode]['isoCode'],
                $this->data[$currencyCode]['name']
            );
        }
        throw new CurrencyUnsupportedException($currencyCode);
    }
}
```

Reset currencies source at Currency class:

```
Currency::resetCurrenciesSource(new UpdatedCurrenciesSource());
```

###  Health Score

16

—

LowBetter than 4% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/21331359?v=4)[Maxym Linenko](/maintainers/MaxLZp)[@MaxLZp](https://github.com/MaxLZp)

### Embed Badge

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

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

###  Alternatives

[stolz/assets

An ultra-simple-to-use assets management library

289527.4k8](/packages/stolz-assets)[alibabacloud/dysmsapi-20170525

Alibaba Cloud Dysmsapi (20170525) SDK Library for PHP

13435.4k38](/packages/alibabacloud-dysmsapi-20170525)[julien731/wp-review-me

A lightweight library to help you get more reviews for your WordPress theme/plugin

355.6k](/packages/julien731-wp-review-me)

PHPackages © 2026

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