Home > PHP & Programming > Quizzes > Advanced PHP Practice Test: OOP
Advanced PHP Practice Test: OOP
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 76% Most missed: “If you create a....-function, PHP will automatically call this function at the e…”
Advanced PHP Practice Test: OOP
Time left 00:00
25 Questions

1. ......the property or method can ONLY be accessed within the class Sol:
2. ..-methods can be overridden by redefining the methods (use the same name) in the child class.
3. ......-classes and methods are when the parent class has a named method, but need its child class(es) to fill out the tasks
4. ........is about writing procedures or functions that perform operations on the data. Sol:
5. An......class is a class that contains at least one abstract method Sol:
6. The....-keyword refers to the current object, and is only available inside methods Sol:
7. All methods in an....-are abstract, so they cannot be implemented in code and the abstract keyword is not necessary
8. Class constants are........However, it is recommended to name the constants in all uppercase letters.
9. The....-will inherit all the public and protected properties and methods from the parent class. In addition, it can have its own properties and methods.
10. ....-make it easy to use a variety of different classes in the same way. When one or more classes use the same interface, it is referred to as 'polymorphism'
11. If you create a....-function, PHP will automatically call this function when you create an object from a class.
12. A class constant is declared inside a class with the....-keyword. Sol:
13. Each....has all the properties and methods defined in the class, but they will have different property values.
14. ....-and methods can have access modifiers which control where they can be accessed Sol:
15. A class can have both static and non-static methods. A static method can be accessed from a method in the same class using the....-keyword and double colon (::)
16. Objects of a class is created using the....-keyword Sol:
17. class needs to inherit multiple behaviors? OOP......is used to solve this problem. Sol:
18. We can access a......-from outside the class by using the class name followed by the scope resolution operator (::) followed by the constant name
19. ......the property or method can be accessed within the class and by classes derived from that class
20. ........in OOP When a class derives from another class. Sol:
21. ......properties can be called directly - without creating an instance of a class. Sol:
22. The....class method must be defined with the same name and it re declares the parent abstract method
23. An iterable is any value which can be looped through with a....-loop. Sol:
24. A....-allows you to initialize an object's properties upon creation of the object Sol:
25. The....-keyword can be used as a data type of a function argument or as the return type of a function: