Malhar Lathkar has Published 155 Articles

PHP srand() Function

Malhar Lathkar

Malhar Lathkar

Updated on 30-Jun-2020 07:29:27

271 Views

Definition and UsageThe srand() function is used to seed the random number generaror. Seeding initializes the random number generator. Most random number generators need initial seeding. In PHP, use of srand() function is optional as it is done automatically.This function doen't have any return value.Syntaxsrand ([ int $seed ] ) ... Read More

PHP sqrt() Function

Malhar Lathkar

Malhar Lathkar

Updated on 30-Jun-2020 07:27:34

2K+ Views

Definition and UsageThe sqrt() function returns square root of a positive float number. Since square root for negative number is not defined, it returns NAN. This is one of the most commonly used functions.This function always returns a floating point number.Syntaxsqrt ( float $arg ) : floatParametersSr.NoParameter & Description1arga number ... Read More

PHP sinh() Function

Malhar Lathkar

Malhar Lathkar

Updated on 30-Jun-2020 07:25:47

64 Views

Definition and UsageThe sinh() function calculates hyperbolic sine of given angle in radians. A hyperbolic sine function is defined assinh(x) = (ex – e-x))/2This function returns a float value between Π and -Π.Syntaxsinh( float $arg ) : floatParametersSr.NoParameter & Description1argA floating point value that represents angle in radiansReturn ValuesPHP sinh() ... Read More

PHP sin() Function

Malhar Lathkar

Malhar Lathkar

Updated on 30-Jun-2020 07:23:38

170 Views

Definition and UsageThe sin() function returns the sine ratio of given angle in radians. In trigonometry, sine of an angle is defined as ratio of lengths of opposite side and hypotenuse.sin(x) = opposite/hypotenuseIf x=90 degree, sin(x) = 1 as opposite side of right angle is a hypotenuseThis function returns a ... Read More

PHP round() Function

Malhar Lathkar

Malhar Lathkar

Updated on 30-Jun-2020 07:21:30

774 Views

Definition and UsageThe round() function proves useful in rounding any floating point number upto a desired precision level. Positive precision parameter causes the number to be rounded after decimal point, whereas with negative precision, rounding occurs before decimal point. Precision is 0 by default.For example, round(10.6) returns 11, round(10.2) returns ... Read More

PHP rad2deg() Function

Malhar Lathkar

Malhar Lathkar

Updated on 30-Jun-2020 07:17:17

119 Views

Definition and UsageMost trigonometric functions like sin, cos, tan etc require angle argument in radians. Whereas, in practice angle is represented in degrees. The rad2deg() function proves useful in conversion of radian angle to degrees.This function returns a float number such that number=rad2deg(x) where x is angle in radians. angle ... Read More

PHP pow() Function

Malhar Lathkar

Malhar Lathkar

Updated on 30-Jun-2020 07:15:50

734 Views

Definition and UsageThe pow () function is used to compute power of a certain number. It returns xy calculation, also termed as x raised to y. PHP also provides "**" asexponentiation operator.So, pow(x, y) returns xy which is same as x**ySyntaxpow ( number $base , number $exp ) : numberParametersSr.NoParameter & Description1baseThe ... Read More

PHP pi() Function

Malhar Lathkar

Malhar Lathkar

Updated on 30-Jun-2020 07:14:02

332 Views

Definition and UsageThe pi () function returns the value of mathematical constant Π. It returns a float value 3.14159265359 which is equal to predefined constant defined in PHP - M_PISyntaxpi ( void ) : floatParametersThis function requires no parametersReturn ValuesPHP pi() function returnsthe mathematical constant Π and is equal to predefined mathematical ... Read More

PHP mt_rand() Function

Malhar Lathkar

Malhar Lathkar

Updated on 30-Jun-2020 07:13:01

316 Views

Definition and UsageThe 'mt' prefix in function's name stands for Mersenne Twister. The mt_rand() function returns an integer using Mersenne Twister Random Number Generator method. This function is a drop-in replacement for PHP's rand() function. default range is between 0 and platform specific mt_getrandmax(). On 64 bit Windows OS, it ... Read More

PHP octdec() Function

Malhar Lathkar

Malhar Lathkar

Updated on 30-Jun-2020 07:12:30

60 Views

Definition and UsageThe octdec() function is used to convert an octal number to decimal number equivalent. The function takes a string with octal representation as argument and retuns an integer.For example octdec('10') returns 8.Syntaxoctdec ( string $octal_string ) : numberParametersSr.NoParameter & Description1octal_stringA string containing the octal number to be convertedReturn ... Read More

Advertisements