Date: 08/03/01
- Next message: boyzone_2001 <email protected>: "[PHP-DOC] Bug #12557 Updated: register_globals can not be set using ini_set."
- Previous message: Jeroen van Wolffelaar: "[PHP-DOC] cvs: phpdoc /en/functions pgsql.xml"
- Next in thread: tom <email protected>: "[PHP-DOC] Bug #12550 Updated: rand() and mt_rand() don't behave as documented"
- Maybe reply: tom <email protected>: "[PHP-DOC] Bug #12550 Updated: rand() and mt_rand() don't behave as documented"
- Maybe reply: tom <email protected>: "[PHP-DOC] Bug #12550 Updated: rand() and mt_rand() don't behave as documented"
- Maybe reply: sniper <email protected>: "[PHP-DOC] Bug #12550 Updated: rand() and mt_rand() don't behave as documented"
- Maybe reply: sniper <email protected>: "[PHP-DOC] Bug #12550 Updated: rand() and mt_rand() don't behave as documented"
- Maybe reply: jeroen <email protected>: "[PHP-DOC] Bug #12550 Updated: rand() and mt_rand() don't behave as documented"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 12550
Updated by: sniper
Reported By: sulka <email protected>
Old Status: Open
Status: Analyzed
Old Bug Type: Math related
Bug Type: Documentation problem
Operating System: N/A
PHP Version: 4.0.6
New Comment:
The documentation is wrong. The proto is this:
mt_rand([int min, int max])
--Jani
Previous Comments:
------------------------------------------------------------------------
[2001-08-03 08:13:29] sulka <email protected>
In PHP documentation rand() and mt_rand() parameters are
specified as "([int min [, int max]])" which implies max is
optional when min is specified, so that rand(256) would
return a number ranging from 256 to getrandmax().
This is not supported however. Looking at rand.c, it looks
like the author partially implemented this and forgot to
add the relevant code to the portion that parses the
parameters on both functions.
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=12550&edit=1
- Next message: boyzone_2001 <email protected>: "[PHP-DOC] Bug #12557 Updated: register_globals can not be set using ini_set."
- Previous message: Jeroen van Wolffelaar: "[PHP-DOC] cvs: phpdoc /en/functions pgsql.xml"
- Next in thread: tom <email protected>: "[PHP-DOC] Bug #12550 Updated: rand() and mt_rand() don't behave as documented"
- Maybe reply: tom <email protected>: "[PHP-DOC] Bug #12550 Updated: rand() and mt_rand() don't behave as documented"
- Maybe reply: tom <email protected>: "[PHP-DOC] Bug #12550 Updated: rand() and mt_rand() don't behave as documented"
- Maybe reply: sniper <email protected>: "[PHP-DOC] Bug #12550 Updated: rand() and mt_rand() don't behave as documented"
- Maybe reply: sniper <email protected>: "[PHP-DOC] Bug #12550 Updated: rand() and mt_rand() don't behave as documented"
- Maybe reply: jeroen <email protected>: "[PHP-DOC] Bug #12550 Updated: rand() and mt_rand() don't behave as documented"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

