Skip to content

Instantly share code, notes, and snippets.

@dflima
Created February 8, 2017 19:08
Show Gist options
  • Save dflima/608e51e91c8c5e4f77912a869824030e to your computer and use it in GitHub Desktop.
Save dflima/608e51e91c8c5e4f77912a869824030e to your computer and use it in GitHub Desktop.
<?php
function fib(int $n) : int
{
return $n <=1 ? $n : fib($n-1) + fib($n-2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment