PHP.nl

floor

floor

Round fractions down

float **floor**  $num

Returns the next lowest integer value (as float) by rounding down if necessary. num

numThe numeric value to round

rounded to the next lowest integer.

The return value of is still of type . num``floor``float

Voorbeeld: example

<?php
echo floor(4.3), PHP_EOL;   // 4
echo floor(9.999), PHP_EOL; // 9
echo floor(-3.14), PHP_EOL; // -4
?>

ceil``round