ioncurly / cbr-converter
Simple CBR currency converter. Testing/studying purposes (used for packagist)
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/ioncurly/cbr-converter
Requires
- php: >=7.4
- ext-simplexml: *
This package is auto-updated.
Last update: 2025-10-14 21:35:22 UTC
README
Short description
The whole point was to publish a library on packagist: https://packagist.org/packages/ioncurly/cbr-converter It uses CBR's XML file with currency rates
This XML file (updated daily) is used: https://www.cbr.ru/scripts/XML_daily.asp
Installation
Run this command in your project
composer require ioncurly/cbr-converter:dev-main
Usage
$exchange = new Exchange("USD", "UAH", 100);
echo $exchange->toDecimal();
It would print some number like "3,693.18"
- First parameter: short abbreviation (3 letters) of currency being converted from;
- First parameter: short abbreviation (3 letters) of currency being converted to;
- Third parameter: amount of money to be converted