Factorial Program in php

Simple Factorial Program:- We can get factorial of any number

function factorial($n)
{
	$fact=1;
	for($i=$n; $i>=1;$i--)
	{
	$fact=$fact*$i;	
	}
	return $fact;
}
echo factorial(4) //Output:- 24
echo factorial(5) //Output:- 120

Factorial Program through recursion of any number

function Recu_factorial($number)
{
	if($number==0)
	{
		return 1;
	}
	return $number * Recu_factorial($number - 1);
}

echo Recu_factorial(4); //Output:- 24
echo Recu_factorial(5); //Output:- 120