1--TEST-- 2Test array_sum() function: resources in array 3--FILE-- 4<?php 5$input = [10, STDERR /* Should get casted to 3 as an integer */]; 6 7echo "array_sum() version:\n"; 8var_dump(array_sum($input)); 9 10echo "array_reduce() version:\n"; 11try { 12 var_dump(array_reduce($input, fn($carry, $value) => $carry + $value, 0)); 13} catch (TypeError $e) { 14 echo $e->getMessage(); 15} 16?> 17--EXPECTF-- 18array_sum() version: 19 20Warning: array_sum(): Addition is not supported on type resource in %s on line %d 21int(13) 22array_reduce() version: 23Unsupported operand types: int + resource 24