I know that using get_class_vars and get_class_methods you can get the properties and methods of the class, but you need to implement the business logic yourself. Because the task assigned by the teacher is a little tight, ask if php has a special class library, you can operate on a class directly and save its properties and methods as xml.