PHP: RoundingMode - Manual (original) (raw)
The RoundingMode Enum
(PHP 8 >= 8.4.0)
Enum synopsis
enum **RoundingMode
{
case HalfAwayFromZero ; // Round to the nearest integer. If the decimal part is 5, round to the integer with the larger absolute value.
case HalfTowardsZero ; // Round to the nearest integer. If the decimal part is 5, round to the integer with the smaller absolute value.
case HalfEven ; // Round to the nearest integer. If the decimal part is 5, round to the even integer.
case HalfOdd ; // Round to the nearest integer. If the decimal part is 5, round to the odd integer.
case TowardsZero ; // Round to the nearest integer with a smaller or equal absolute value.
case AwayFromZero ; // Round to the nearest integer with a greater or equal absolute value.
case NegativeInfinity ; // Round to the largest integer that is smaller or equal.
case PositiveInfinity ; // Round to the smallest integer that is greater or equal.
}
Found A Problem?
There are no user contributed notes for this page.