This article brings you a summary of the nine kinds of mathematical functions in PHP, there is a certain reference value, the need for friends can refer to, I hope to help you.
1 max () Max ()
echo Max (Array (4,5,6)); 6
2. Minimum min ()
echo min (Array (4,5,6)); 4
3. Find square root sqrt ()
echo sqrt (16); 4
4. Rounding of floating-point numbers round ()
Two parameters passed in
Echo Round (3.725, 2); 3.73, the parameter (2) retains the number of digits after the decimal point, the default is 0 rounded result
5. Return number of N-square pow ()
Echo pow (2,3);//8
6. To take the whole floor of the FA ();
echo Floor (7.88888); 7 floating-point numbers directly out of the decimal part
7. One-way rounding ceil ()
echo ceil (9.111); 10 floating point number in one rounding
8. Absolute ABS ()
$abs = ABS (-9.9); 9.9 Numeric Absolute Number
9. Random number Mt_rand ()
echo Mt_rand (0,100);//n-> random number returns the value in the range