PHP.nl

ceil

ceil

Round fractions up

float **ceil**  $num

Returns the next highest integer value by rounding up if necessary. num

numThe value to round

rounded up to the next highest

integer. The return value of is still of type as the value range of is usually bigger than that of . num``ceil``float``float``int

Voorbeeld: example

<?php
echo ceil(4.3), PHP_EOL;    // 5
echo ceil(9.999), PHP_EOL;  // 10
echo ceil(-3.14), PHP_EOL;  // -3
?>

floor``round