mrprompt / money
money and currency helper
1.1.0
2020-03-18 05:27 UTC
Requires
- php: >=7.3
- ext-simplexml: *
Requires (Dev)
- phpunit/phpunit: 9.0.*
This package is auto-updated.
Last update: 2026-02-27 22:36:33 UTC
README
Library to made work with currency and money easy.
Install
composer install mrprompt/money
Use
use MrPrompt\Money\Currency; $money = new Currency('BRL'); $money->code(); // return the code (the same passed at constructor) $money->number(); // return the code as number, like 960. $money->name(); // return the currency name, like Real $money->countries(); // return the countries that use the currency $money->decimals(); // return the decimals used by the currency $money->symbol(); // return the symbol of the currency $money->format(1.00); // format the currency
License
GPLv3