PHP Manual
Prev |  | Next

# floor

(PHP 3 <= 3.0.18, PHP 4 >= 4.0.0)

floor -- Round fractions down

## Description

``float floor` (float value)`

Returns the next lowest integer value by rounding down `value` if neccessary. The return value of floor() is still of type float because the value range of float is usually bigger than that of int.

Example 1. floor() examples
    $four = floor(4.3);   // $four = 4.0;
    $nine = floor(9.999); // $nine = 9.0;

See also ceil() and round().

Prev | Home | Next
expm1 | Up | getrandmax