PHP gmp_abs() FunctionPHP has a built-in function called gmp_abs() that uses to figure out the absolute value of a GMP number. The function shows the actual value without a numerical symbol if the value is positive or negative. We do not use the positive sign with a number to get the absolute value. SyntaxThe following syntax shows the GMP function. Parameters
Return Value:This function gives a positive GMP number the same as the number passed as a parameter in terms of its actual values. ExamplesThe following examples show the absolute or actual value of the GMP parameter. Example1: the following example shows an absolute function with value. Output The following output shows the actual value. ![]() Example2: the following example shows the absolute function with variable. Output The following output shows the actual value. ![]() Example3: the following example shows the absolute function with the variable. The decimal values and the positive sign do not work on function. Output The following output shows the actual value. ![]() ConclusionIt helps to use the absolute value for the web application. It shows basic numbers using absolute php functions.
Next TopicPHP gmp_add() Function
|