Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

ceil

Description

The ceil of Math for PHP round fractions up.

Syntax

ceil ( float $value ) : float

Parameters

value

The value to round

Return

value 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 integer.

Examples

1

<?

$value = -99.9999;

$return = ceil($value);

echo $return;

?>
-99

2

<?

$value = -99.0001;

$return = ceil($value);

echo $return;

?>
-99

3

<?

$value = 99.0001;

$return = ceil($value);

echo $return;

?>
100

4

<?

$value = 99.9999;

$return = ceil($value);

echo $return;

?>
100
HomeMenu