X
HOME HTML5 CSS3 JAVASCRIPT SQL PHP5 JQUERY ANGULAR BOOTSTRAP3 XML MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

PHP lcg_value() Function

PHP Math Reference PHP Math Reference

Example

Return a pseudo random number in a range between 0 and 1:

<?php
echo lcg_value();
?>

Run example »

Definition and Usage

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


Syntax

lcg_value();

Technical Details

Return Value: A pseudo random float value in a range between 0 and 1
Return Type: Float
PHP Version: 4+


PHP Math Reference PHP Math Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook