PHPackages                             eugabrielsilva/currency - 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. eugabrielsilva/currency

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

eugabrielsilva/currency
=======================

PHP currency manipulation class.

v1.0.0(1y ago)023MITPHPPHP ^7.4|^8.0

Since Feb 3Pushed 1y ago1 watchersCompare

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

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Currency for PHP
----------------

[](#currency-for-php)

This package is a translation of [currency.js](https://github.com/scurker/currency.js) for PHP. It was built to work around floating point issues when working with currency values.

Currency works with values as integers behind the scenes, resolving some of the most basic precision problems.

### Installation

[](#installation)

```
composer require eugabrielsilva/currency

```

### Usage

[](#usage)

**With real numbers:**

```
$result = currency(3.2)->multiply(0.5)->add(1)->value;
```

**With currency instances:**

```
$value1 = currency(3.2);
$value2 = currency(0.5);
$value3 = currency(1);

$result = $value1->multiply($value2)->add($value3)->value;
```

**Formatting:**

```
$value = currency(3.2)->multiply(0.5)->add(1);

echo $value->format();
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance45

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

461d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5c76209b4baa704d3233f164a88f927ccde79c5c3e9dd84e2201f98de7d62afa?d=identicon)[eugabrielsilva](/maintainers/eugabrielsilva)

---

Top Contributors

[![eugabrielsilva](https://avatars.githubusercontent.com/u/64693687?v=4)](https://github.com/eugabrielsilva "eugabrielsilva (3 commits)")

---

Tags

currencymoneyphp

### Embed Badge

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

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

###  Alternatives

[responsiv/currency-plugin

Currency plugin for October CMS

171.3k1](/packages/responsiv-currency-plugin)

PHPackages © 2026

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