PHP Mathematics Function:-
इस function का use Mathematics calculation क़ो solve करने के लिये किया जाता है । यह function interger तथा float के साथ work करते है ।
यह function PHP core के part होते है तथा इनके लिये installation required नहीं होता है । जैसे abs(), cos(), cos() etc.
PHP mathematics function का example निम्न है
For Example:- abs() function में positive या negetive integer या float value डालने पर हमेशा positive output प्राप्त होता है अर्थात abs() function का use हमेशा positive output प्राप्त करने के लिये किया जाता है

Figure:-1 Use Of abs() function
उपरोक्त code को जब हम browser पर run कराते है तो following Output produce होता है -
Output

Figure:-2 abs() function Output
Function |
Description |
abs() |
Returns the absolute (positive) value of a number |
acos() |
Returns the arc cosine of a number |
asin() |
Returns the arc sine of a number |
atan() |
Returns the arc tangent of a number in radians |
base_convert() |
Converts a number from one number base to another |
bindec() |
Converts a binary number to a decimal number |
ceil() |
Rounds a number up to the nearest integer |
cos() |
Returns the cosine of a number |
decbin() |
Converts a decimal number to a binary number |
dechex() |
Converts a decimal number to a hexadecimal number |
decoct() |
Converts a decimal number to an octal number |
cos() |
Returns the cosine of a number |
deg2rad() |
Converts a degree value to a radian value |
exp() |
Calculates the exponent of e |
fmod() |
Returns the remainder of x/y |
getrandmax() |
Returns the largest possible value returned by rand() |
hexdec() |
Converts a hexadecimal number to a decimal number |
is_finite() |
Checks whether a value is finite or not |
is_infinite() |
Checks whether a value is infinite or not |
log() |
Returns the natural logarithm of a number |
log10() |
Returns the base-10 logarithm of a number |
max() |
Returns the highest value in an array, or the highest value of several specified values |
min() |
Returns the lowest value in an array, or the lowest value of several specified values |
octdec() |
Converts an octal number to a decimal number |
pi() |
Returns the value of PI |
pow() |
Returns x raised to the power of y |
rad2deg() |
Converts a radian value to a degree value |
rand() |
Generates a random integer |
round() |
Rounds a floating-point number |
sin() |
Returns the sine of a number |
sqrt() |
Returns the square root of a number |
tan() |
Returns the tangent of a number |