例1
<?php
function welcome($name){
echo ' hello ' . $name;
}
echo welcome('zxl');
?>
例2
<?php
function add($num1,$num2){
echo $num1 + $num2;
}
echo add(1,2);
?>
例3
<?php
function subtract($num1,$num2){
$total = $num1 + $num2;
return $total;
}
echo subtract(1,2);
?>
例4
<?php
function z($num1,$num2){
$total 12;
echo $total;
}
z(1,2);
?>