Aer Interpreter Source
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

19 lines
250 B

class Program {
private int fib(int $n) {
int $last = 0;
int $cur = 1;
--$n;
while($n > 0) {
--$n;
int $tmp = $cur;
$cur = $last + $cur;
$last = $tmp;
}
return $cur;
}
public int main() {
var_dump($this->fib(43));
}
}