Skip to main content

abs function php

 <?php

echo abs(-5.6); // 5.2 (double/float)
echo abs(9); // 9 (integer)
echo abs(-12); // 12 (integer)
?>

Comments