Are there any specific PHP functions or libraries that can assist in generating unique random numbers within a specified range?

Generating unique random numbers within a specified range in PHP can be achieved by using the `shuffle()` function to create an array of unique numbers within the specified range, and then selecting numbers from this array sequentially. Another approach is to use the `array_rand()` function to randomly select unique numbers within the specified range without replacement.

// Generate unique random numbers within a specified range using shuffle()
function generateUniqueRandomNumbers($min, $max, $quantity) {
    $numbers = range($min, $max);
    shuffle($numbers);
    return array_slice($numbers, 0, $quantity);
}

// Example: Generate 5 unique random numbers between 1 and 10
$uniqueNumbers = generateUniqueRandomNumbers(1, 10, 5);
print_r($uniqueNumbers);