Return the absolute value of different numbers:
The abs() function returns the absolute (positive) value of a number.
Parameter | Description |
---|---|
number | Required. Specifies a number. If the number is of type float, the return type is also float, otherwise it is integer |
Return Value: | The absolute value of the number |
---|---|
Return Type: | Float / Integer |
PHP Version: | 4+ |