1--TEST--
2Test array_sum() function with empty array
3--FILE--
4<?php
5$input = [];
6
7echo "array_sum() version:\n";
8var_dump(array_sum($input));
9
10echo "array_reduce() version:\n";
11var_dump(array_reduce($input, fn($carry, $value) => $carry + $value, 0));
12?>
13--EXPECT--
14array_sum() version:
15int(0)
16array_reduce() version:
17int(0)
18