I don't get what array_walk($arr, 'intval');
does, which I have commented out in the following code snippet:
<?php
$handle = fopen ("php://stdin","r");
fscanf($handle,"%d",$n);
$arr_temp = fgets($handle);
$arr = explode(" ",$arr_temp);
//array_walk($arr,'intval');
$sum=0;
foreach($arr as $i)
{
$sum = $sum + $i;
}
echo $sum;
?>
If I use it or not does not seem to change the output.