I've a function wich sum some payments.
function get_payment() {
return 1439.60 + 1439.60 + 1439.60;
}
$a = get_payment();
var_export($a);
//I GET: $a = 4318.7999999999993;
Now i'm trying to round to 2 decimal without success
$b = round($a, 2);
var_export($b);
//I GET: $b = 4318.8000000000002;
I'd like to have 4318.80 in FLOAT type to compare with others values.
I don't want to use number_format (to display result)