Home »
MCQs »
PHP MCQs
What is the use of PHP lcg_value() function?
75. What is the use of PHP lcg_value() function?
- Generates a pseudo random number in a range between 0 and 1
- Generates a pseudo random number in a range between the given minimum to maximum numbers
- Generates a pseudo random number in a range between 0 and 1 using the Mersenne Twister algorithm
- Generates a pseudo random number in a range between -1 and +1
Answer: A) Generates a pseudo random number in a range between 0 and 1
Explanation:
The use of the lcg_value() function in PHP is to generate a pseudo random number in a range between 0 and 1.