3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a=9; function fibonacci ($n) { if ($n == 0) { return 0; } else if ($n == 1) { return 1; } else { return fibonacci( $n - 1 ) + fibonacci( $n - 2 ); } } echo "the 9th term is " .fibonacci($a) ; ?>
based on 88RVY
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
the 9th term is 34
Output for hhvm-3.10.0

Process exited with code 153.