PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      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