1--TEST--
2Test array_sum() function : usage variations - array with reference variables as elements
3--FILE--
4<?php
5/*
6* Testing array_sum() with 'input' having reference variables as elements
7*/
8
9echo "*** Testing array_sum() : array with elements as reference ***\n";
10
11$value1 = -5;
12$value2 = 100;
13$value3 = 0;
14$value4 = &$value1;
15
16// input array containing elements as reference variables
17$input = array(
18  0 => 10,
19  1 => &$value4,
20  2 => &$value2,
21  3 => 200,
22  4 => &$value3,
23);
24
25var_dump( array_sum($input) );
26
27echo "Done"
28?>
29--EXPECT--
30*** Testing array_sum() : array with elements as reference ***
31int(305)
32Done
33