round to the nearest multiple of 5 php code example Example: php round nearest half $x = floor($x * 2) / 2;