PHP lcg_value()Functions
Examples
Returns a pseudo-random number in the range (0, 1):
<?php
echo lcg_value();
?>
echo lcg_value();
?>
Run Example »
Definition and Usage
The lcg_value() function returns a pseudo-random number in the range (0, 1).
Syntax
lcg_value();
Technical Details
| Return value: | A pseudo-random floating-point value in the range (0, 1). |
|---|---|
| Return type: | Float |
| PHP version: | 4+ |
PHP Math Reference Manual Other Extensions