box-o-sand/docroot/html/functions.php

31 lines
447 B
PHP
Raw Normal View History

<?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>