reference/gmp/examples.xml
9ddd75d72456fb97261c978af4043e90b18802af
...
...
@@ -11,7 +11,7 @@
11
11
function fact($x)
12
12
{
13
13
$return = 1;
14
-
for ($i=2; $i < $x; $i++) {
14
+
for ($i=2; $i <= $x; $i++) {
15
15
$return = gmp_mul($return, $i);
16
16
}
17
17
return $return;
18
18