Signatur
array_product(array $array): int|float
Beschreibung
Bei leerem Array: 1 (neutrales Element der Multiplikation).
Parameter
| Name | Typ | Default | Beschreibung |
|---|---|---|---|
| $array Pflicht | array | — | Werte. |
Rückgabewert
Typ
int|float
Beschreibung
Produkt.
Beispiele
Fakultät
<?php
echo array_product(range(1, 5)); // 120 = 5!