# moneyphp/money

PHP implementation of Fowler's Money pattern.

Repository: https://github.com/moneyphp/money
Canonical: https://ross.abutalabs.com/products/money
Homepage: http://moneyphp.org
Language: PHP
License: MIT
License Family: permissive
Topics: php, money, fowler-money-pattern, currency, currency-exchange-rates, currency-converter
Last push: 2026-07-07T18:12:10+00:00

## Health v2 (maintenance only)
Score: 81/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 91, release rhythm 58, longevity 100
- inputs: {"age_days": 5636, "days_push": 57, "days_rel": 121, "gap_med": 135.0, "n_releases_24m": 5}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4861, forks 443 (observed 2026-08-28T04:09:01.551877+00:00)

## What it is
A PHP library implementing Fowler's Money pattern as a value object for safe monetary calculations, avoiding float rounding errors by using string-backed big integers. It includes currency repositories, money formatting, allocation, and exchange rate support via Swap.

## Use cases
- store and calculate monetary values without float errors
- convert between currencies with exchange rates
- split an amount into parts without losing cents
- format money amounts for display with intl
- work with ISO currencies in PHP
- handle very large monetary values with big integers

## When to choose
- you're building a PHP application dealing with payments, billing, or prices
- you need exact arithmetic on monetary values
- you need currency conversion or allocation logic

## When to avoid
- your project is not in PHP
- you only need simple display formatting without arithmetic
- you need a full accounting or ledger system rather than a value object

## Facets
- artifact type: library
- maturity: stable
- function: serialization, math
- domain: fintech, e-commerce, developer-tools
- platform: php
- tags: money-pattern, currency, value-object, exchange-rates, arbitrary-precision

## Member repositories
- moneyphp/money (main) score 81

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:01.551877+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-29T18:18:21.865118+00:00, confidence not recorded.
  - readme: https://github.com/moneyphp/money (fetched 2026-08-28T04:09:01.551877+00:00, sha 4db227008035)
- Data as of 2026-08-30T08:39:29.467469+00:00.
