3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function fibonacciNumbers($n) { $sq5 = sqrt(5); $a = (1 + $sq5) / 2; $b = (1 - $sq5) / 2; return (pow($a, $n) - pow($b, $n)) / $sq5; } function getArr ($n) { $return = array(); for ($i = 1; $i <= $n; $i++) { echo fibonacciNumbers($i); } }
based on X6Ts4
Output for 4.3.0 - 7.2.0