This is an error 404
There are `0` results
preferences:
137.57 ms | 1398 KiB | 7 Q<?hh
function fibonacci(int $n): int {
/*
* Notice that in PHP, we do not have to declare our variables, nor must we
* declare their types. Also see how variables in PHP are prefaced with the
* dollar sign. Other than that, this is identical to the C version of this function.
*/
$a = 0;
$b = 1;
for ($i = 0; $i < $n; $i++){
printf("%d\n",$a);
$sum = $a+$b;
$a = $b;
$b = $sum;
}
}
fibonacci(1000);