Doc #72830 [Ver->Csd]: mt_srand documentation

From: Date: Mon, 15 Aug 2016 10:40:11 +0000
Subject: Doc #72830 [Ver->Csd]: mt_srand documentation
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-13811@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72830&edit=1 ID: 72830 Updated by: cmb@php.net Reported by: montdm at montdm dot shost dot ca Summary: mt_srand documentation -Status: Verified +Status: Closed Type: Documentation Problem Package: Math related Operating System: Windows PHP Version: Irrelevant Assigned To: cmb Block user comment: N Private report: N New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2016-08-15 10:39:49] cmb@php.net Automatic comment from SVN on behalf of cmb Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=339883 Log: Fix #72830: mt_srand documentation ------------------------------------------------------------------------ [2016-08-15 10:25:56] cmb@php.net Indeed, the example doesn't make sense. mt_srand() expects an integer value[1], so basically anything between PHP_INT_MIN and PHP_INT_MAX. However, this value will be passed to php_mt_srand() which expects an unsigned integer, so negative values will overflow, what doesn't appear to be a particular issue in this case. [1] <https://github.com/php/php-src/blob/PHP-7.0.10/ext/standard/rand.c#L244-L258> ------------------------------------------------------------------------ [2016-08-14 02:10:09] montdm at montdm dot shost dot ca Description: ------------ Hi, On your website for the mt_srand (in english and in french), you have writen in the "description" section : void mt_srand ([ int $seed ] ) = I understand that the 'seed' has to be an int value In the "parameters" section : seed : an optional seed value (english version) seed : une valeur d'initialisation aléatoire (french version) = no explanation about what is the "value" or "valeur" And in the "examples" section "Example #1 mt_srand() example" : the make_seed function returns a float ! What should be the "value" ? A (int) or a (float) ? It will be great if the 3 sections "description", "parameters" and "examples" were coherent Best regards ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=72830&edit=1

« previous php.doc.bugs (#13811) next »