3 ms·
The MT implementation used with Lua* generates a predictable sequence based on seeds, though. It may just be the PHP implementation that makes random number seq
by silentbicycle 17y ago
The MT implementation used with Lua* generates a predictable sequence based on seeds, though. It may just be the PHP implementation that makes random number sequences non-reproducible. Why would this be desirable, by the way?
* LHF's lrandom: http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/#lrandom http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/#lrandom . While this is not in the core language, it's by one of Lua's three authors, and could be considered a semi-official extended library. (Since Lua is targeted for embedding, it's core standard library has been kept very tiny.)