PHP code example of clippings / currency-convert
1. Go to this page and download the library: Download clippings/currency-convert library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
clippings / currency-convert example snippets
use CL\CurrencyConvert\Converter;
use CL\FileCache\ItemPool;
use SebastianBergmann\Money\GBP;
use SebastianBergmann\Money\Currency;
Converter::initialize(new ECBSource(new ItemPool()));
$hundred_pounds = new GBP(10000);
$converted = Converter::get()->convert($hundred_pounds, new Currency('EUR'));