English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Theceil()
The function rounds a number to the nearest integer. The value is rounded up to the nearest largest integer.
ceil(num)
num-the number to be rounded
Theceil()
The function returns the value rounded up to the nearest integer.
<?php echo(ceil(0.90) . "<br>"); echo(ceil(0.15) . "<br>"); ?>
Output Result
1<br>1<br>
Let's look at another example-
<?php echo(ceil(2)); ?>
Output Result
2
Let's look at another example-
<?php echo(ceil(8.9) . "<br>"); echo(ceil(-9.2) . "<br>") ?>
Output Result
9<br>-9<br>