We can "cheat" via round with
$rounded = round($roundee / 10) * 10;
We can also avoid going through floating point division with
function roundToTen($roundee)
{
$r = $roundee % 10;
return ($r <= 5) : $roundee - $r : $roundee + (10 - $r);
}
Edit: I didn't know (and it's not well documented on the site) that round
now supports "negative" precision, so you can more easily use
$round = round($roundee, -1);
Edit again: If you always want to round up, you can try
function roundUpToTen($roundee)
{
$r = $roundee % 10;
if ($r == 0)
return $roundee;
return $roundee + 10 - $r;
}