PHP: lcg_value() function
Description
The lcg_value() function is used to get a pseudo random number in the range of 0 and 1.
Version
(PHP 4 and above)
Syntax
lcg_value ()
Return value
A pseudo random value in the range of (0, 1)
Value Type: Float.
Example:
<?php
echo lcg_value();
?>
Output:
0.39961090888377
View the example in the browser
See also
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://www.w3resource.com/php/function-reference/lcg_value.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics