<?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><head>';
  print '<link rel="stylesheet" type="text/css" href="../teaching.css">';
  print '</head><body><table border><tr><td>Length<td>Seconds';

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

  print '</table></body></html>';
?>