mt_getrandmax(): largest possible random value

Check the maximum mt_rand() value

mt_getrandmax() returns the largest value that mt_rand() can generate. It is mainly useful when working directly with the Mersenne Twister generator.

echo mt_getrandmax();

Start with this current pattern. The examples below are retained for additional variations, output and reference.

<?Php
echo mt_getrandmax(); // Output 2147483647
?>
Syntax
int mt_getrandmax ( void )

Returns the larget random value returned by a call to mt_rand() without arguments
Math Functions max() function


Subscribe to our YouTube Channel here



plus2net.com











PHP video Tutorials
✖
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
© 2000-2026 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer