PHP.nl

bcceil

bcceil

Round up arbitrary precision number

string **bcceil** string $num

Returns the next highest integer value by rounding up if necessary. num

numThe value to round.

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

This function throws a if is not a well-formed BCMath numeric string. num

Voorbeeld: example

<?php
var_dump(bcceil('4.3'));
var_dump(bcceil('9.999'));
var_dump(bcceil('-3.14'));
?>
string(1) "5"
string(2) "10"
string(2) "-3"

bcfloor``bcround``BcMath\Number::ceil