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 )
Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.