Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP lcg_value() Function

PHP lcg_value() Function

PHP Math Reference Manual PHP Math Reference Manual

Example

Return a pseudo-random number in the range (0, 1):

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 PHP Math Reference Manual