Skip to content

Commit f489891

Browse files
author
llgoer
committed
Update test-ffi.php
1 parent 8fc9313 commit f489891

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

test-ffi.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
<?php
22
// 一个PHP的fib函数
33
function fib($n) {
4-
if ($n < 0) {
5-
return NULL;
6-
} elseif ($n === 0) {
7-
return 0;
8-
} elseif ($n === 1 || $n === 2) {
4+
if ($n === 1 || $n === 2) {
95
return 1;
106
} else {
117
return fib($n-1) + fib($n-2);

0 commit comments

Comments
 (0)