2

I currently need to use a script that requires python and PHP to output the same random numbers given a seed. Is there any RNG that can let them do this?

When I use mt_rand and mt_srand and python's default rng (which is supposed to be mersenne twist) with the same seed I get different results.

1 Answers1

0

There is absolutely no requirement than Python and PHP (or any other language) should generate the same random number for the same seed.

Mariusz Jamro
  • 30,615
  • 24
  • 120
  • 162