PHP array_product() 函數(shù)
PHP array_product() 函數(shù)
定義和用法
array_product() 函數(shù)計算并返回數(shù)組的乘積。
語法
array_product(array)
參數(shù) | 描述 |
---|---|
array | 必需。規(guī)定數(shù)組。 |
技術(shù)細(xì)節(jié)
返回值: | 返回一個整數(shù)或者浮點(diǎn)數(shù)的乘積。 |
---|---|
PHP 版本: | 5.1.0+ |
更新日志: | 自 PHP 5.3.6 起,空數(shù)組的乘積為 1。在 PHP 5.3.6 之前,空數(shù)組的乘積為 0。 |
更多實(shí)例
