Jump to: navigation, search

Php ceil

From w3cyberlearnings

Contents

PHP function ceil

This function rounds the X number to smallest value integer not less than X.

Syntax ceil

X is an value to round.

ceil(X);

Example 1

<?php

echo ceil(2.5);
echo "<br/>";
echo ceil(2.2);
echo "<br/>";
echo ceil(-2.2);
?>

Output

3
3
-2


Related Links


Navigation
Web
SQL
MISC
References