sfullman;10899099 wrote:I wouldn't recommend that - wouldn't
floor($diff2, 3);
be better
It might be better if [man]floor/man accepted a second parameter. 😉
You could do it arithmetically with:
$test = 0.0468162756901;
echo round($test - 0.0005, 3); // 0.046
Although usually you would tend to round things like that:
$test = 0.0468162756901;
echo round($test, 3); // 0.047
But since I don't know the underlying requirement, who knows?