[edit] Last updated: Fri, 26 Apr 2013 array_sum (PHP >= 4.0.4, PHP 5) array_sum — Calculate the sum of values in an array Report a bug Description number array_sum ( array $array ) array_sum() returns the sum of values in an array Report a bug Parameters array The input array Report a bug Return Values Returns the sum of values as an integer or float Report a bug Changelog Version 4.2.1 Description PHP versions prior to 4.2.1 modified the passed array itself and converted strings to numbers (which most of the time converted them to zero, depending on their value) Examples Example #1 array_sum() examples Report a bug