Skip to content
Chung Leong edited this page Jan 10, 2022 · 3 revisions

ceil - Rounds fractions up

float ceil( float $x )

ceil() returns the smallest integral value that is not less than x.

Parameters:

x - The number to round. It can be a scalar or an array.

Return Value:

The smallest integral value not less than x. If x is an array, the return value will also be an array.

Notes:

ceil(-3.8) == -3.0 and not -4.0

Version

1.0 and above.

Clone this wiki locally