laravel/framework — pull request #3186 by jowy (2014-01-10 20:11:18+00:00)
Title: Collection::random() not actually random

array_intersect_key() is incorrectly using the output of array_rand() which is an array with zero based, consecutive keys (e.g. [0=>n, 1=>n, 2=>n, 3=>n]) of length $amount as the challenge. this resulting in identical results with calls on identical collections. flipping the output of array_rand() so that the random values are used as challenging keys with array_intersect_key() fixes this issue.