round

round -- Rounds a float.

Description

double round(double val);

Returns the rounded value of val.

  1 
  2 $foo = round( 3.4 );   // $foo == 3.0
  3 $foo = round( 3.5 );   // $foo == 4.0
  4 $foo = round( 3.6 );   // $foo == 4.0
  5       

See also ceil() and floor().