In case you were wondering where are HALF_UP and HALF_DOWN here:
- Half up is AwayFromZero
- Half down is TowardsZero(PHP 8 >= 8.4.0)
The RoundingMode enum is used to specify how rounding should be performed for round(), bcround(), and BcMath\Number::round().
5,
round to the integer with the larger absolute value.
5,
round to the integer with the smaller absolute value.
5,
round to the even integer.
5,
round to the odd integer.
In case you were wondering where are HALF_UP and HALF_DOWN here:
- Half up is AwayFromZero
- Half down is TowardsZero