phpday 2027 - Call for Papers

getrandmax

(PHP 4, PHP 5, PHP 7, PHP 8)

getrandmax — Show largest possible random value

Description

function getrandmax(): int

Returns the maximum value that can be returned by a call to rand().

Parameters

This function has no parameters.

Return Values

The largest possible random value returned by rand()

See Also

User Contributed Notes 1 note

up
2
Anonymous
4 years ago
On a stock installation as of version 7.4.33 / 8.1.12, this function seems to return 2147483647 (maximum 32-bit integer).
Adding new notes is disabled. Please see the links in the Found A Problem? section.
To Top