-
Joey3000 a rédigé
This is done for the following reasons: * Code clean-up. From https://secure.php.net/manual/en/function.mt-srand.php: > Note: There is no need to seed the random number generator with srand() or mt_srand() as this is done automatically. * Re-seeding of PRNGs makes them more predictable. E.g., the `microtime()` which is used for the seeding: * On Windows (before Win8): seems to return 0, according to https://stackoverflow.com/questions/18889244/php-5-5-on-windows-microtime-behavior. * On other OSes: The current time is easily guessable, with the "microseconds" part brute-forcible.
Joey3000 a rédigéThis is done for the following reasons: * Code clean-up. From https://secure.php.net/manual/en/function.mt-srand.php: > Note: There is no need to seed the random number generator with srand() or mt_srand() as this is done automatically. * Re-seeding of PRNGs makes them more predictable. E.g., the `microtime()` which is used for the seeding: * On Windows (before Win8): seems to return 0, according to https://stackoverflow.com/questions/18889244/php-5-5-on-windows-microtime-behavior. * On other OSes: The current time is easily guessable, with the "microseconds" part brute-forcible.