Latest web development tutorials

PHP getrandmax() 函數

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

實例

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

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

運行實例»

定義和用法

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


語法

getrandmax();

技術細節

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


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