php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #54746 suggestion for rand() prototype
Submitted: 2011-05-16 16:05 UTC Modified: 2011-07-02 04:11 UTC
From: gwarnants at gmail dot com Assigned:
Status: Wont fix Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2011-05-16 16:05 UTC] gwarnants at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.rand#Description
---

Current prototype of rand() function is :

int rand ( void )
int rand ( int $min , int $max )

I think it should be better to write a single prototype indicating optional parameters like this :

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



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-05-16 16:23 UTC] rquadling@php.net
To be able to render that, the underlying XML needs to be able to describe it.

This particular request was in DocBook V5.1 
(http://www.docbook.org/tdg51/en/html/group.methodparam.html)

I don't think that this is officially released yet.

So, for the time being, 2 prototypes is the most accurate way that can be used 
to describe the arguments.
 [2011-07-02 04:11 UTC] frozenfire@php.net
-Status: Open +Status: Wont fix
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 02:01:28 2024 UTC