PHPize Online / SQLize Online
A A A

Share   Donate   Blog   Popular

ceil

Tags: PHP 5.x PHP 7.x PHP 8.x

ceil — Round fractions up.

Description

ceil(
    int|float $num
): float
Returns the next highest integer value by rounding up num if necessary.

Parameters

num
The value to round

Return Values

num rounded up to the next highest integer. The return value of ceil() is still of type float as the value range of float is usually bigger than that of int.

ceil - New snippets