you're lucky I'm in a good mood 😉 - here's a plug and play function. Though I didn't test it so it might have a couple errors, they should be small and easy to fix, if they exist at all.
<?php
function int_floor($value,$radius) {
//make sure the user passed in an integer
if(!ereg('^[0-9]+$')) {
return 0;
} //end if
//just because I don't trust php's type conversions
$value = intval($value);
$radius = intval($radius);
//here's the magic. The mod of the radius with this
//value will return the remainder of integer division
//so we use this fact to decrement the input value
$output = $value - ($value%$radius);
return $output;
} //end int_round
?>