PHP code example of eugabrielsilva / currency
1. Go to this page and download the library: Download eugabrielsilva/currency 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/ */
eugabrielsilva / currency example snippets
$result = currency(3.2)->multiply(0.5)->add(1)->value;
$value1 = currency(3.2);
$value2 = currency(0.5);
$value3 = currency(1);
$result = $value1->multiply($value2)->add($value3)->value;
$value = currency(3.2)->multiply(0.5)->add(1);
echo $value->format();