parser/phpast/samples/fib.php
2022-07-19 15:29:20 +01:00

9 lines
109 B
PHP

<?php
function fib($n) {
if ($n < 2) {
return $n;
}
return fib($n - 1) + fib($n - 2);
}