Russian Ukraine English
Catalog RSS


ceil

(PHP 3, PHP 4 )

ceil -- Round fractions up

Description

int ceil (float number)

Returns the next highest integer value from number. Using ceil() on integers is absolutely a waste of time.


$x = ceil(4.25);  //  which would make $x=5       

NOTE: PHP/FI 2's ceil() returned a float. Use: $new = (double)ceil($number); to get the old behaviour.

See also floor() and round().

Led