示例#1
0
function Factorial($n)
{
    if ($n == 1) {
        return 1;
    } else {
        return $n * Factorial($n - 1);
    }
}
$Numb_2 = 2;
// Возможно 6 обращений
GetDivision($Numb_1, $Numb_2, $Div);
echo "{$Numb_1} / {$Numb_2} = {$Div}\n";
$Numb_1 = 2;
$Numb_2 = 8;
$Involution;
// Возможно 7 обращений
GetInvolution_use_BuiltIn_function();
echo "Not my func: " . $Numb_1 . "^" . $Numb_2 . " = {$Involution}\n";
$Numb_1 = 5;
$Numb_2 = 4;
// Возможно 7 обращений
$Involution = My_GetInvolution($Numb_1, $Numb_2);
echo "My func: " . $Numb_1 . "^" . $Numb_2 . " = {$Involution}\n";
$n = 3;
$Result = Factorial();
echo "Factorial(" . $n . ") = {$Result}\n";
$ssss = 'I m the LITERAL !!!!!!!
function GetSum_global_return_and_params()
{
	global $Numb_1, $Numb_2, $Sum;
	$Sum = $Numb_1 + $Numb_2;
}';
echo $ssss;
//-----------------------------------------
/*It was very easy program
	my friend*/
?>