Following code displaying INF value on screen
<p>Following code displaying INF as result. Any advice</p>

<pre><code>&lt;?php
function fibonacci($n)
{
$a = 1; $b = 1; $result = 0;
for ($i = 0; $i &lt; $n; $i=$i+1)
{
    $sum = $a+$b;
    $a = $b;
    $b = $sum;
    if ($a %2 == 0)
    {   

        $result = $result + $a;
    }
}
echo "&lt;br/&gt;".$result;
}
echo fibonacci(400000);
?&gt;
</code></pre>
