You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
440 B
23 lines
440 B
<?php
|
|
/**
|
|
* @todo sudo apt install php8.4-bcmath
|
|
* @todo sudo apt install php8.4-intl
|
|
*/
|
|
|
|
use BcMath\Number;
|
|
|
|
require "libs/Dollars.php";
|
|
|
|
function init(): Number {
|
|
$num1 = new Number('2200');
|
|
$num2 = new Number('700');
|
|
$money = ($num1 / $num2) + $num1 - $num2;
|
|
//echo bcround($result, 2);
|
|
return $money;
|
|
}
|
|
|
|
$d = new Dollars();
|
|
$c = init();
|
|
echo $d->formatAsUSD($c);
|
|
echo "\n";
|
|
echo $d->intlUSD($c);
|
|
|