Quiz 3
1. Which keyword is used to define a class in PHP?
2. How do you create an object from a class named 'Car'?
3. What is the name of the magic method used as a constructor?
4. Which visibility modifier allows a property to be accessed from anywhere?
5. Which modifier restricts access to only the class that defines the property?
6. Which keyword is used to inherit from a parent class?
7. What does the '$this' keyword represent in a class?
8. How do you access a static property inside the class definition?
9. Which keyword prevents a class from being inherited?
10. Which keyword is used to use an interface in a class?
Previous Next