3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function fibs_under_100() { $output = array(0, 1); $i = 1; $j = 1; for (; $j < 100; ) { $last = $j; $j = $i + $j; $i = $last; $output[] = $last; } return $output; } var_dump(fibs_under_100());
based on 1JD40
Output for 4.3.0 - 7.2.0
array(12) { [0]=> int(0) [1]=> int(1) [2]=> int(1) [3]=> int(2) [4]=> int(3) [5]=> int(5) [6]=> int(8) [7]=> int(13) [8]=> int(21) [9]=> int(34) [10]=> int(55) [11]=> int(89) }