I’m having a problem with using a basic shuffle()
function in Laravel. It returns the same result, which seems to be changing once every 10 or 20 minutes.
Here’s the basic code I’m testing:
$ar = ['a', 'b', 'c']; shuffle($ar); var_dump($ar); Log::info(json_encode($ar));
And here’s the log:
Advertisement
Answer
You probably initialize your random seed with a constant value somewhere else.