php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #27032 php.net/rand reads 'value', returns an integer
Submitted: 2004-01-24 18:41 UTC Modified: 2004-01-25 06:10 UTC
From: trhaynes at hotmail dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: N/A
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: trhaynes at hotmail dot com
New email:
PHP Version: OS:

 

 [2004-01-24 18:41 UTC] trhaynes at hotmail dot com
Description:
------------
php.net/rand reads:

"If called without the optional min, max arguments rand() returns a pseudo-random value between 0 and RAND_MAX. If you want a random number between 5 and 15 (inclusive), for example, use rand (5, 15)."

However, from "int rand ( [int min, int max])" and the example given, I'm assuming that it does not give a *value*, but, more specifically, an *integer*.  Perhaps the description should be changed.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-25 06:10 UTC] nlopess@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2020-02-07 06:12 UTC] phpdocbot@php.net
Automatic comment on behalf of nlopess
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=2fe85c879ae46888d0a7bc6315f9c51f2643da51
Log: fix #27032
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Aug 10 17:00:03 2025 UTC