3v4l.org

run code in 300+ PHP versions simultaneously
<?hh $n = 10; function fibonacci($n){ /* * 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; } }

This is an error 404

There are `0` results


preferences:
149.35 ms | 1398 KiB | 7 Q