Sorun çözüldü array_sum ile çözdüm.

$a=array(5,15,25);
echo array_sum($a);
?>