|  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:
Solve the problem:
12 - 4 = ?
Subscribe to this entry?

 [2011-05-16 16:05 UTC] gwarnants at gmail dot com
From manual page:

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] )


Add a Patch

Pull Requests

Add a Pull Request


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

This particular request was in DocBook V5.1 

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