Working through the exercises in The Joy of PHP by Alan Forbes