Answer Posted / nilsoft
ceil()
Returns the next highest integer value by rounding up value
if necessary.
<?php
echo ceil(4.3); // 5
echo ceil(9.999); // 10
echo ceil(-3.14); // -3
?>
floor()
Returns the next lowest integer value by rounding down value
if necessary.
<?php
echo floor(4.3); // 4
echo floor(9.999); // 9
echo floor(-3.14); // -4
?>
Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
What is the difference between laravel and php?
How you can update memcached when you make changes to php?
Is python similar to php?
What is string function sql?
How is it possible to cast types in php?
Is multilevel inheritance possible in php?
Which php function will attach one file to another?
Can we use include ("xyz.php") two times in a php page "index.php"?
Explain me what is the use of 'print' in php?
What is overloading and overriding in php?
Is php better than java?
What is php and its uses?
Which function is used to read a single character from a file in PHP.
How to access a global variable inside a function?
How we can retrieve the data in the result set of mysql using php?