example code of the <HeadFirstDesignPattern>, written in PHP