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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
12 - 4 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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: Sun Jun 16 03:01:28 2024 UTC