Whats new in PHP 8.4
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.
php84/BcMath.php

23 lines
446 B

<?php
/**
* @todo sudo apt install php8.4-bcmath
* @todo sudo apt install php8.4-intl
*/
use BcMath\Number;
require "libs/autoload.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 libs\Dollars();
$c = init();
echo $d->formatAsUSD($c);
echo "\n";
echo $d->intlUSD($c);