switch ($variable)
{
case 1:
...
break;
case 2:
...
break;
default:
...
}
function addOne ($number)
{
return $number + 1;
}
// illustrates a function as a procedure
// uses a default value
function bold ($string = "leipzig")
{
echo "<b>" . $string . "</b>";
}
// pass by reference
function doubleValue (&$number)
{
$number *= 2;
}
// static local variable
function count()
{
static $count = 0;
$count++;
return count;
}
Write a php file that computes and prints all of the times between 0 hours and 12 hours (inclusive) when the hour hand and the minute hand of an analog clock are in alignment. The output of the php file should match this file exactly.
The clock.php file that we developed during class.
Do something interesting and non-trivial that uses some of today's material. If you are a Montana State student, demonstrate it during today's lab period. If you are a University of Leipzig student, either demonstrate it during today's lab period or e-mail it to Sebastian (loewe AT uni-leipzig.de) no later than the end of the day.