Name
round
Synopsis
float round(floatnumber
[, intprecision
[, intmode
]])
Returns the integer value nearest to
number
at the
precision
number of decimal places. The
default for precision is 0
(integer
rounding). The mode
parameter dictates the
method of rounding used:
| Round up |
| Round down |
| Round up if the significant digits are even |
| Round down if the significant digits are odd |
Get Programming PHP, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.