bcfloor
Description
Syntax
bcfloor( string $num ): string
Parameters
num
The value to round.
Return
Returns a numeric string representing num rounded down to the nearest integer.
Examples
1 · num · negative · high
<? $num = -1.9999; $return = bcfloor($num); var_dump($return);
string(2) "-2"
2 · num · negative · low
<? $num = -1.0001; $return = bcfloor($num); var_dump($return);
string(2) "-2"
3 · num · positive · low
<? $num = 1.0001; $return = bcfloor($num); var_dump($return);
string(1) "1"
4 · num · positive · high
<? $num = 1.9999; $return = bcfloor($num); var_dump($return);
string(1) "1"