What is abs function in php

abs function in php ?

<?php

ex: $value = -120000;

echo abs($value);

?>

Result : 120000.

Uses of abs() function and explanation

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

all negative values converted from positive values.

Sign In or Register to comment.