mrprompt / money
money and currency helper
Installs: 3 650
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 0
Forks: 0
Open Issues: 0
Requires
- php: >=7.3
- ext-simplexml: *
Requires (Dev)
- phpunit/phpunit: 9.0.*
This package is auto-updated.
Last update: 2024-11-18 15:49:51 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