You can either send a floating-point number or an integer to abs( ) : abs « Math « PHP






You can either send a floating-point number or an integer to abs( )

 
<?
    abs(50.1); // 50.1
    abs(-12.5); // 12.5
?>
  
  








Related examples in the same category

1.Calling the Built-in abs() Function
2.abs( ) function returns the absolute value of the parameter