15 1 0 4000 1 https://codeblock.co.za 300 true 0
theme-sticky-logo-alt

ceil()

0 Comments

Programming Language

PHP [Versions: 4, 5, 7]

Syntax

Typical Usage

Rounds fractions up to the nearest whole number.

Accepted Parameters

  • value (float) (Required): The float value you wish to round up.

Return Value(s)

Returns a value rounded up to the next highest integer.

Notes

  • The return value of ceil() is still of type float.

Examples of ceil()

Example 1

<?php
$ceil = ceil(2.1234);
print_r($ceil)
// Output = 2

The above output will be 2.

Example 2

<?php
$ceil = ceil(68.7654);
print_r($ceil)
// Output = 69

The above output will be 69.

Similar Functions in Other Languages

Was This Helpful?

Previous Post
array_slice()
Next Post
floor()

0 Comments

Leave a Reply