<html>
<body>
function myfunction($v1,$v2)
{
return $v1+$v2;
}
$a=array(10,15,20);
print_r(array_reduce($a,"myfunction",5));
</body>
<!-- Mirrored from www.w3schools.com/php/phptryit.asp?filename=tryphp_func_array_reduce3 by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 02:50:52 GMT -->
</html>