In php
I called round()
function twice below.
1st call gets $ppp
parameter, which is 5.585
when printed.
2nd call gets 5.585
as parameter as hard coded.
Why does round function returns 5.59 for the first one and 5.58 for the second one ?
$price = 75.3975;
$ppp = $price - ($price/(1.08));
echo $ppp.'<br>'; //Prints 5.585
echo round($ppp,2,PHP_ROUND_HALF_EVEN).'<br>'; //Prints 5.59
echo round(5.585,2,PHP_ROUND_HALF_EVEN); //Prints 5.58