The abs function returns the absolute value of a number.
$var1 = abs(5);
$var1;
// int(5)
$var = abs(-4.2);
echo $var;
// float(4.2)
The abs function returns the absolute value of a number.
$var1 = abs(5);
$var1;
// int(5)
$var = abs(-4.2);
echo $var;
// float(4.2)