$v = vec[1, 2, 3, 4, 5]; $mean = Math\mean($v); echo "Mean of the array is $mean \n"; // Output: Mean of the array is 3