PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

hexdec> <fmod
Last updated: Mon, 26 Nov 2007

view this page in

getrandmax

(PHP 4, PHP 5)

getrandmax — 显示随机数最大的可能值

说明

int getrandmax ( void )

返回调用 rand() 可能返回的最大值。

参见 rand()srand()mt_getrandmax()



hexdec> <fmod
Last updated: Mon, 26 Nov 2007
 
add a note add a note User Contributed Notes
getrandmax
siska dot jakub at gmail dot com
01-Sep-2008 09:03
under winXP, php5.2.6
getrandmax() returns 32767 (2^15-1) while on that same machine
mt_getrandmax() returns 2147483647 (2^31-1)
Anonymous
10-Apr-2008 04:06
it returns 2147483647: (2^31) - 1
stefan at aks-host dot de
02-Jan-2008 03:09
under win2k3, php5.2.5, it returns 32767...
chax-phpnet at i-rpg dot net
02-Dec-2007 11:27
it returns 2147483647 (2^31) for both i386 and x86_64 under GNU/Linux.

hexdec> <fmod
Last updated: Mon, 26 Nov 2007
 
 
show source | credits | sitemap | contact | advertising | mirror sites