Umm... I have an answer to this:
$str_expected[$i] = '$expected["'.$i.'"] = 1/(1+pow(10, (func_math_mean_array($array';
Okay...
$str_expected[$i] .= ') - $elo['.$i.'])/400));';
Okay....
if ($str_expected[$i] == '1/(1+pow(10, (func_math_mean_array($array) - $elo[0])/400));')
Expand this:
if( '$expected["0"] = 1/(1+pow(10, (func_math_mean_array($array) - $elo[0])/400);' == '1/(1+pow(10, (func_math_mean_array($array) - $elo[0])/400));')
echo true;
Do you see the difference.... here it is on two lines:
$expected["0"] = 1/(1+pow(10, (func_math_mean_array($array) - $elo[0])/400);
1/(1+pow(10, (func_math_mean_array($array) - $elo[0])/400));
Notice a difference?
EDIT
CRAP!!! Much too slow in actually pointing it out 🙁