Solution to OOP Test of PHP