Round in action : Math Functions « Math « PHP






Round in action


<?
$my_int = round(4.7); 
echo($my_int);

$my_int = round(-4.7);
echo($my_int);

$my_int = round(-4.5);
echo($my_int);

?>
           
       








Related examples in the same category

1.rand demo
2.Exp
3.Using the arbitrary-precision functions for exact integer arithmetic
4.Difference between ceil and floor
5.Floor in action
6.Get the Power
7.sqrt