14th Jan 2021
PHP [Versions: 4, 5, 7]
Rounds fractions up to the nearest whole number.
- value (float) (Required): The float value you wish to round up.
Return Value(s)Returns a value rounded up to the next highest integer.
- The return value of ceil() is still of type float.
Examples of ceil()
<?php $ceil = ceil(2.1234); print_r($ceil) // Output = 2
The above output will be 2.
<?php $ceil = ceil(68.7654); print_r($ceil) // Output = 69
The above output will be 69.
Used In Projects
Similar Functions in Other Languages
Was This Helpful?
If this post has helped you, please let me know. Your feedback will be highly appreciated and will help me build better content.