Menu Samaritan's Purse

FLOOR

Round fractions down

SYNTAX

floor ( float $value ) : float

PARAMETERS

value

The numeric value to round

RETURN

value rounded to the next lowest integer. The return value of floor() is still of type float because the value range of float is usually bigger than that of integer. This function returns FALSE in case of an error (e.g. passing an array).

EXAMPLES

1

-100

2

-100

3

99

4

99

PHP