php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45531 description on rand() is wrong
Submitted: 2008-07-16 16:56 UTC Modified: 2008-07-21 09:13 UTC
From: wayne at emaildienst dot de Assigned:
Status: Closed Package: Translation problem
PHP Version: Irrelevant OS: none
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: wayne at emaildienst dot de
New email:
PHP Version: OS:

 

 [2008-07-16 16:56 UTC] wayne at emaildienst dot de
Description:
------------
hi, following description is wrong:

int rand  ([ int $min  ], int $max  )

it should be:

int rand ([[int $min], int $max])

because all parameters are optional.

if there is only one given parameter, the function gets it as $max.
if there are two parameters given, the function gets the first as $min and the second as $max.




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-16 17:41 UTC] tularis@php.net
It looks correct to me in the english version of the manual; where are you seeing it like that? 

I can see it in the German translation, so I'll change the category to translation problem.
 [2008-07-16 19:43 UTC] wayne at emaildienst dot de
hi,

yes in the german documentation is the error.

and yes the english version is correct.

int rand  ( int $min  , int $max  )
is the correct description.
 [2008-07-21 09:13 UTC] kalle@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.


 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Dec 04 02:03:36 2021 UTC