September 2001
Intermediate to advanced
768 pages
32h 45m
English
int ceil(float number) Returns an integer that is the next larger than the float given as the argument.
Returns:
Integer on success; FALSE on error
Description:
Returns an integer that is the next larger than the float used as the argument. In essence, it rounds up a floating-point number to an integer, no matter what the value of the floating-point integer is. It doesn’t round down.
Version:
PHP 3, PHP 4
See also:
floor() round()
Example:
$number = 12.023; echo "The next highest integer of $number is ", ceil($number); |
Read now
Unlock full access