You may get or specify currency for money ($) 123.4
.
Returns: Currency
Parameters:
Currency $currency
- a currency to set.
Returns: Money
$money = money('12345000');
$money->getCurrency(); // PostScripton\Money\Currency class
$money->getCurrency()->getSymbol(); // "$"
$money->toString(); // "$ 1 234.5"
$money->setCurrency(currency('RUB'));
$money->getCurrency(); // PostScripton\Money\Currency class
$money->getCurrency()->getSymbol(); // "₽"
$money->toString(); // "1 234.5 ₽"
📌 Back to the contents.