Description Edit

abs returns the absolute value of input. The type of the returned value depends on the type of input. It will be will float if the type of input is also float. Otherwise the return value will be of type integer.

Note that if the type of input isn't float or integer the value will be converted to integer.

Parameters Edit

{{{returns}}} abs (mixed number)

Parameter Infos Edit

Parameter PHP Version Type
abs 4 or 5 returns mixed (integer, float)
number 4 or 5 mixed (integer, float, string, array)

Examples Edit

Example 1: Edit

//upper cse to lower case and wise versa
$rhyme="am a good girl";
echo $ucsrt;

Output Edit


For more details on this function, visit its entry in the php manual.