Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp rand

This page redirects to an external site: https://developer.wordpress.org/reference/functions/wp_rand/

Description

Generates a random number

Parameters

$min
(integer) (optional) Lower limit for the generated number (optional, default is 0)
Default: 0
$max
(integer) (optional) Upper limit for the generated number (optional, default is 4294967295)
Default: 0

Return Values

(integer) 
A random number between min and max

Change Log

Since: 2.6.2

Source File

wp_rand() is located in wp-includes/pluggable.php