3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function fib($n) { return ((4 << $n*(3+$n)) / ((4 << 2*$n) - (2 << $n) - 1) & ((2 << $n) - 1)); } for ($i = 10; $i < 20; $i++) { echo "Fib {$i}: " . fib($i) . "\n"; }
based on Ag7Au
Output for 7.0.0 - 7.3.0rc4
Fib 10: 0 Fib 11: 0 Fib 12: 0 Fib 13: 0 Fib 14: 0 Fib 15: 0 Fib 16: 0 Fib 17: 0 Fib 18: 0 Fib 19: 0
Output for 5.5.0 - 5.6.28
Fib 10: 0 Fib 11: 16 Fib 12: 8 Fib 13: 0 Fib 14: 8 Fib 15: 0 Fib 16: 65536 Fib 17: 0 Fib 18: 8 Fib 19: 0