What are some common methods for generating random numbers in PHP?

Generating random numbers in PHP is a common task that can be achieved using various methods. One common method is using the `rand()` function, which generates a random integer between a specified minimum and maximum value. Another method is using the `mt_rand()` function, which uses the Mersenne Twister algorithm for generating random numbers. Additionally, PHP also provides the `random_int()` function for generating cryptographically secure random integers.

// Generate a random number using rand() function
$randomNumber = rand(1, 100);
echo $randomNumber;

// Generate a random number using mt_rand() function
$randomNumber = mt_rand(1, 100);
echo $randomNumber;

// Generate a cryptographically secure random number using random_int() function
$randomNumber = random_int(1, 100);
echo $randomNumber;