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 overriding in php?
How to swap two variables without using 3rd temp variable.
How error handling is being handled by php?
How to remove values saved in the current session?
Explain me differences between get and post methods?
What are php errors?
Is php fully object oriented?
Explain a resource?
How do you count numbers in php?
What does $_cookie mean?
How can we execute a php script using command line?
What exactly is validating and sanitizing?
Which is the best php framework for a beginner?
What is api example?
How to define a user function?