3v4l.org

run code in 300+ PHP versions simultaneously
<?php // PHP Program to Generate // Fibonacci Series function fibonacciSeries($n){ $num1 = 0; $num2 = 1; for ( $i = 0; $i < $n; $i++ ) { echo $num1 . ", "; $num3 = $num1 + $num2; $num1 = $num2; $num2 = $num3; } } // Driver Code $n = 10; fibonacciSeries($n); ?>
Output for 8.2.0 - 8.2.27, 8.3.0 - 8.3.15, 8.4.1 - 8.4.2
0, 1, 1, 2, 3, 5, 8, 13, 21, 34,

preferences:
43.74 ms | 406 KiB | 5 Q