mardi 5 décembre 2017

PHP srand() on different servers

I'm using srand() to fix my randomize functions for the application. E.g. for srand(1) I get one set of random items from the array, and for srand(2) - another one.

I noticed that on my local machine and on the server these sets are different.

Is there a way to make them the same? The important part of my app is that srand(1) and srand(2) should produced constant results.




Aucun commentaire:

Enregistrer un commentaire