# brick/money

A money and currency library for PHP

Repository: https://github.com/brick/money
Canonical: https://ross.abutalabs.com/products/brick-money
Language: PHP
License: MIT
License Family: permissive
Topics: php, money, currency, exchange-rates, currency-converter
Last push: 2026-07-30T22:34:03+00:00

## Health v2 (maintenance only)
Score: 96/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 95, release rhythm 95, longevity 100
- inputs: {"age_days": 4112, "days_push": 34, "days_rel": 34, "gap_med": 18, "n_releases_24m": 14}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1926, forks 118 (observed 2026-08-28T04:05:55.608863+00:00)

## What it is
A PHP library providing immutable Money and Currency classes with exact arithmetic and explicit rounding control, built on brick/math. It supports ISO 4217 currencies, money of any scale, and currency conversion with exchange rates.

## Use cases
- handle money amounts without floating-point rounding errors in PHP
- convert between currencies using exchange rates
- work with ISO 4217 currency codes
- perform exact arithmetic on monetary values
- store and format money with explicit rounding rules
- build an e-commerce checkout with precise price calculations

## When to choose
- you need exact, arbitrary-precision money math in PHP
- you want immutable value objects for monies and currencies
- you need currency conversion with controlled rounding

## When to avoid
- you need a full billing or invoicing system rather than a money library
- your project runs on PHP below 8.2 and you cannot pin an older release
- you need live exchange-rate fetching built in

## Facets
- artifact type: library
- maturity: active
- function: math, serialization
- domain: fintech, developer-tools, e-commerce
- platform: php
- tags: money, currency, exchange-rates, iso-4217, exact-arithmetic, immutable-classes

## Member repositories
- brick/money (main) score 96

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:55.608863+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:09:13.180470+00:00, confidence not recorded.
  - readme: https://github.com/brick/money (fetched 2026-08-28T04:05:55.608863+00:00, sha e384a776485e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
