3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a=8; function getfibseries ($n) { if ($n == 0) { return 0; } else if ($n == 1) { return 1; } else { return getfibseries( $n - 1 ) + getfibseries ( $n - 2 ); } } echo "the 9th term is " .getfibseries($a) ; ?>
based on aTNE6
Output for 4.3.0 - 7.1.0
the 9th term is 21