- Output for 5.3.0 - 5.3.18, 5.3.20 - 5.3.28, 5.4.0 - 5.4.30
- Parse error: syntax error, unexpected ',', expecting ';' in /in/U0CYs on line 9
Process exited with code 255. - Output for 5.3.19
Process exited with code 143.
<?php
/**
* Sum byte values from $start of $str
**/
function sum($str, $start)
{
$sum = 0;
$i = $start;
for ( ,$max = strlen($str); $i < $max; ++$i) {
$sum += ord($str[$i]);
}
return $sum;
}
$str = 'hello world';
echo sum($str, strpos($str, ' '));