HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

bcceil

Description

The bcceil of BCMath for PHP rounds up to an arbitrary precision number.

Syntax

bcceil(
    string $num
): string

Parameters

num

The value to round.

Return

Returns a numeric string representing num rounded up to the nearest integer.

Examples

1 · num · negative · high

<?

$num = -1.9999;

$return = bcceil($num);

var_dump($return);
string(2) "-1"

2 · num · negative · low

<?

$num = -1.0001;

$return = bcceil($num);

var_dump($return);
string(2) "-1"

3 · num · positive · low

<?

$num = 1.0001;

$return = bcceil($num);

var_dump($return);
string(1) "2"

4 · num · positive · high

<?

$num = 1.9999;

$return = bcceil($num);

var_dump($return);
string(1) "2"