Matematične operacije nad tabelami v PHP

array_sumarray_product
Задание 1

Podana je tabela:

php<?php
  $arr = [1, 2, 3, 4, 5];
?>

Poiščite vsoto elementov te tabele.

Задание 2

Podana je tabela:

php<?php
  $arr = [1, 2, 3, 4, 5];
?>

Poiščite produkt (množenje) elementov te tabele.

Задание 3

Podana je tabela:

php<?php
  $arr = [1, 2, 3, 4, 5];
?>

S pomočjo funkcij array_sum in count poiščite aritmetično sredino elementov (vsota elementov deljena z njihovim številom) te tabele.