Easy Tutorial
❮ Pdostatement Errorinfo Func String Money Format ❯

PHP ceil() Function

PHP Math Reference Manual

Example

Rounds up to the nearest integer:


Definition and Usage

The ceil() function rounds a number up to the nearest integer.

Tip: To round down to the nearest integer, see the floor() function.

Tip: To round a floating-point number, see the round() function.


Syntax

Parameter Description
number Required. Specifies the value to be rounded up.

Technical Details

Return Value: The nearest integer rounded up.
Return Type: Float
--- ---
PHP Version: 4+
--- ---
❮ Pdostatement Errorinfo Func String Money Format ❯