Php Math functions


The Math functions through we can easily perform the mathematical task. so you can follow the below functions.
Function Descrption
abs() The abs() function returns the absolute value of a number.
ceil() The ceil() function returns the value of a number rounded UPWARD to the nearest integer.
floor() The floor() function returns the value of a number rounded DOWNWARDS to the nearest integer.
round() The round() function rounds a number to the nearest integer.
fmod() The fmod() function divides x by y and returns the remainder(modulo) of the division.
min() The min() function returns the number with the lowest value of two specified numbers.
max() The max() function returns the number with the highest value of two specified numbers.
pow() The pow() function raises the first argument to the second argument and returns the result.
sqrt() The sqrt() function returns the square root of a number.
rand() The rand() function generates a random integer. if this function is called without parameters, it returns a random integer between 0 and RAND_MAX.