<?php
  function show($nc) {
    $s = "";
    $start = microtime(true);
    for ($i = 0; $i < $nc; $i++) $s = $s . '.';
    $elapsed = microtime(true) - $start;
    printf("<tr><td>%d<td>%.3f\n", $nc, $elapsed);
  }

  print "<html>\n";
  print "<head>\n";
  print "<link rel=\"stylesheet\" type=\"text/css\" href=\"../teaching.css\">\n";
  print "</head>\n";
  print "<body>\n";
  print "<table border><tr><td>Length<td>Seconds\n";

  show(1000);
  show(10000);
  show(100000);
  show(1000000);

  print "</table>\n";
  print "</body>\n";
  print "</html>\n";
?>