abs( ) function returns the absolute value of the parameter : abs « Math « PHP





abs( ) function returns the absolute value of the parameter

 
<?
    abs(50); // 50
    abs(-12); // 12
?>
  
  

Related examples in the same category

1.Calling the Built-in abs() Function
2.You can either send a floating-point number or an integer to abs( )