Easy Tutorial
❮ Func Date Strftime Php Password_Hash ❯

PHP abs() Function

PHP Math Reference Manual

Example

Returns the absolute value of different numbers:


Definition and Usage

The abs() function returns the absolute value of a number.


Syntax

Parameter Description
number Required. Specifies a number. If the number is of type float, the return type will also be float; otherwise, it will be returned as an integer.

Technical Details

Return Value: The absolute value of the number.
Return Type: Float / Integer
--- ---
PHP Version: 4+
--- ---
❮ Func Date Strftime Php Password_Hash ❯