Latest web development tutorials

PHP mt_getrandmax() 函數

PHP Math 參考手冊 PHP Math參考手冊

實例

返回通過調用mt_rand() 函數顯示的隨機數的最大可能值:

<?php
echo(mt_getrandmax());
?>

運行實例»

定義和用法

mt_getrandmax()函數返回通過調用mt_rand()函數顯示的隨機數的最大可能值。


語法

mt_getrandmax();

技術細節

返回值: 通過調用mt_rand() 函數顯示的隨機數的最大可能值:
返回類型: Integer
PHP 版本: 4+


PHP Math 參考手冊 PHP Math參考手冊