|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-02-27 09:31 UTC] sas
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 15 03:00:01 2025 UTC |
rand() always uses a max value 1 greater than inputed. Consider the following code snippet: <?php srand((double)microtime()*1000000); $number = rand(5, 15); $echo "$number\n"; ?> $number should contain an integer between 5 and 15. However, this bug causes $number to contain an integer between 5 and 16.