box-o-sand/php-practice/web/html/wikipedia-tutorial/functions.php

31 lines
447 B
PHP

<?php
require_once("_head.php");
mkheader("functions!", "#fafafa");
?>
<body>
<!-- ======================================================= -->
<pre><?php
function sum($this, $other=5) {
return $this + $other;
}
print "I am human, I am.\n";
$a = $_GET['a'] ? $_GET['a'] : 72 ;
print "$a plus 5 is " . sum($a, 5) . ".\n";
print "$a plus 5 is " . sum($a) . ".\n";
?></pre>
</body>
</html>