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
 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 11:01:30 2024 UTC