Search w3schools.com:

SHARE THIS PAGE

PHP lcg_value() Function


PHP Math Reference Complete PHP Math Reference

Definition and Usage

The lcg_value() function returns a pseudo random number in the range of 0 and 1.

Syntax

lcg_value()


Example

<?php
echo lcg_value();
?>

The output of the code above could be:

0.408212029326


PHP Math Reference Complete PHP Math Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]