Skip to content

Instantly share code, notes, and snippets.

@SourceCode
Created December 20, 2015 13:36
Show Gist options
  • Save SourceCode/9d3ec5237d05237b16ee to your computer and use it in GitHub Desktop.
Save SourceCode/9d3ec5237d05237b16ee to your computer and use it in GitHub Desktop.
Fibonacci Challenge
<?php
function fib($n)
{
return $n < 3 ? 1 : fib($n - 1) + fib($n - 2);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment