1. Go to this page and download the library: Download doxadoxa/money-lib 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/ */
doxadoxa / money-lib example snippets
use Money\Currency;
use Money\Money;
$bitcoin = new Currency('BTC', 8);
$amount = Money::make( $bitcoin, 0.1858);
echo $amount->getAmount(); // (float) 0.1858
echo $amount->getStringAmount(); // (string) "18580000"
use Money\Currency;
use Money\Money;
$ethereum = new Currency('ETH', 18);
$amount = Money::make( $ethereum, 0.000000000000000005);
echo $amount->getAmount(); // (float) 5.0E-18
echo $amount->getStringAmount(); // (string) "5"