Math ceil function returns the upper nearest value of number.
PHP ceil() Function Example:
Math ceil function returns the upper nearest value of number.
Syntax:
ceil(parameter)
where parameter is an integer or float value.
Example:
<?php echo(ceil(0.99) . "<br />"); echo(ceil(0.01) . "<br />"); echo(ceil(-8.9)); ?>
Output:
The output of this example is:
1 1 -8
[ 0 ] Comments