Malhar Lathkar has Published 155 Articles

PHP mt_srand() Function

Malhar Lathkar

Malhar Lathkar

Updated on 30-Jun-2020 07:10:52

296 Views

Definition and UsagePrefix 'mt' in function's name stands for Mersenne Twister. The mt_srand() function is used to seed the Mersenne Twister random number generaror. Seeding initializes the random number generator. Most random number generators need initial seeding. In PHP, use of mt_srand() function is optional as it is done automatically.This ... Read More

PHP mt_getrandmax() Function

Malhar Lathkar

Malhar Lathkar

Updated on 30-Jun-2020 07:06:54

112 Views

Definition and UsageThe 'mt' prefix in function's name stands for Mersenne Twister. The mt_ getrandmax() function returns largest integer that can be used in PHP. This function uses Mersenne Twister Random Number Generator method. Value returned by this function serves as the upper limit for mt_rand() function to generate random ... Read More

PHP min() Function

Malhar Lathkar

Malhar Lathkar

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

234 Views

Definition and UsageThe min () function returns lowest element in array, or lowest amongst two or more comma separated parameters.Syntaxmin ( array $values ) : mixedOrmin ( mixed $value1 [, mixed $... ] ) : mixedParametersSr.NoParameter & Description1valuesIf only one parameter is given, it should be an array of valaues which may ... Read More

PHP max() Function

Malhar Lathkar

Malhar Lathkar

Updated on 29-Jun-2020 09:12:39

383 Views

Definition and UsageThe max () function returns highest element in array, or highest amongst two or more comma separated parameters.Syntaxmax ( array $values ) : mixedOrmax ( mixed $value1 [, mixed $... ] ) : mixedParametersSr.NoParameter & Description1valuesIf only one parameter is given, it should be an array of valaues which may ... Read More

PHP log10() Function

Malhar Lathkar

Malhar Lathkar

Updated on 29-Jun-2020 09:10:34

101 Views

Definition and UsageThe log10 () function calculates base-10 logarithm of a number.Base-10 logarithm is also called common or sandard algorithm. The log10(x) function calculates log10x. It is related to natural algorithm by following equation −log10x=logex/loge10 So thatlog10100=loge100/loge10 = 2In PHP, log10 is represented by log10() functionSyntaxlog10 ( float $arg ) : floatParametersSr.NoParameter & ... Read More

PHP log1p() Function

Malhar Lathkar

Malhar Lathkar

Updated on 29-Jun-2020 09:09:22

87 Views

Definition and UsageHere 1p stands for 1 plus. The log1p () function calculates natural (base-e) logarithm of a 1+number.log1p(x)=log(1+x).log1p is calculated in a way such that its value is accurate even for very small x such that 1+x is nearly equal to xSyntaxlog1p ( float $arg ) : floatParametersSr.NoParameter & Description1argThe number ... Read More

PHP log() Function

Malhar Lathkar

Malhar Lathkar

Updated on 29-Jun-2020 09:08:16

204 Views

Definition and UsageThe log () function calculates natural logarithm of a number.Logarithm is inverse of eponential. If 102=100, it means log10100=2. Natural logarithm is calculated with Euler Number e as base. In PHP, the predefined constant M_E gives value of e which is 2.7182818284590452354For example, exp(4.60517018599)=100 (it is also same as e4.60517018599=100). Hence, ... Read More

PHP lcg_value() Function

Malhar Lathkar

Malhar Lathkar

Updated on 29-Jun-2020 09:06:34

97 Views

Definition and UsageThe lcg_value() function generates a random number between 0 and 1.LCG stands for linear congruential generator. This generator generates a sequence of pseudo-randomized numbers calculated with a discontinuous piecewise linear equation. This is one of the oldest pseudorandom number generator algorithmsSyntaxlcg_value ( void ) : floatParametersReturn ValuesPHP lcg_value() ... Read More

PHP is_nan() Function

Malhar Lathkar

Malhar Lathkar

Updated on 29-Jun-2020 09:05:16

722 Views

Definition and UsageNAN stands for "Not A Number". The is_nan() function checks whether its argument is not a number.Syntaxis_nan ( float $val ) : bool ParametersSr.NoParameter & Description1valThe value to be verified if infinite or notReturn ValuesPHP is_nan() function returns TRUE if val is "not a number", otherwise it returns FALSE.PHP ... Read More

PHP is_infinite() Function

Malhar Lathkar

Malhar Lathkar

Updated on 29-Jun-2020 09:03:58

197 Views

Definition and UsageThe is_infinite() function returns a boolean value. It checks whether given parameter is an infinnite number and if so the function returns TRUE, otherwise FALSE. A number is treated as infinite if it is beyond acceptable range of float in PHP.Syntaxis_infinite ( float $val ) : bool ParametersSr.NoParameter ... Read More

Advertisements