a small OOP exercise in PHP