mercredi 23 septembre 2020

Shuffle() returns same results

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:

enter image description here




Aucun commentaire:

Enregistrer un commentaire