import zend standard tests
[hiphop-php.git] / hphp / test / zend / good / ext-standard-array / array_sum_error.php
blobe058d59fbdab02388ee0f9cbbca7029e0f353de9
1 <?php
2 /* Prototype : mixed array_sum(array &input)
3 * Description: Returns the sum of the array entries
4 * Source code: ext/standard/array.c
5 */
7 echo "*** Testing array_sum() : error conditions ***\n";
9 // Zero arguments
10 echo "-- Testing array_sum() function with zero arguments --\n";
11 var_dump( array_sum() );
13 // One more than the expected number of arguments
14 echo "-- Testing array_sum() function with more than expected no. of arguments --\n";
15 $input = array(1, 2, 3, 4);
16 $extra_arg = 10;
17 var_dump( array_sum($input, $extra_arg) );
19 echo "Done"