This functions return ceil($nb) if the double or float value is bigger than "$nb.5" else it's return floor($nb)
<?php
function arounds_int($nb) {
if(!is_numeric($nb)) {
return false;
}
$sup = round($nb);
$inf = floor($nb);
$try = (double) $inf . '.5' ;
if($nb > $try) {
return $sup;
}
return $inf;
}
?>