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

search for in the

hexdec> <fmod
Last updated: Fri, 30 Jan 2009

view this page in

getrandmax

(PHP 4, PHP 5)

getrandmax乱数の最大値を取得する

説明

int getrandmax ( void )

rand() をコールすることにより得られる最大の値を返します。

返り値

rand() が返す乱数の最大値を返します。

参考

  • rand() - 乱数を生成する
  • srand() - 乱数ジェネレータを初期化する
  • mt_getrandmax() - 乱数値の最大値を表示する



add a note add a note User Contributed Notes
getrandmax
stefan at aks-host dot de
02-Jan-2008 09:09
under win2k3, php5.2.5, it returns 32767...
chax-phpnet at i-rpg dot net
02-Dec-2007 05:27
it returns 2147483647 (2^31) for both i386 and x86_64 under GNU/Linux.

hexdec> <fmod
Last updated: Fri, 30 Jan 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites