My Report

PHP OOP Test – 3


Correct Answer: 2 points | Wrong: -1 point
Grades: A* (100% score) | A (80%-99%) | B (60%-80%) | C (40%-60%) | D (0%-40%)
advertisement

1. The class from which the child class inherits is called ________

i) Child class
ii) Parent class
iii) Super class
iv) Base class

2. Which of the following advanced OOP features is/are not supported by PHP?

i) Method overloading
ii) Multiple Inheritance
iii) Namespaces
iv) Object Cloning

3. Which version of PHP introduced the advanced concepts of OOP?

4. Which feature allows us to call more than one method or function of the class in single instruction?

5. If your object must inherit behavior from a number of sources you must use a/an

6. Which of the following is/are true for an abstract class?
i) Abstract classes in PHP are declared with the help of abstract keyword.
ii) A class is declare abstract by using the keyword implements.
iii) It is a class that really isn’t supposed to ever be instantiated but instead serves as a base class.
iv) Attempting to instantiate an abstract class results in an error.

7. Which method is used to tweak an object's cloning behavior?

8. If one intends to create a model that will be assumed by a number of closely related objects, which class must be used?

9. Which magic method is used to implement overloading in PHP?

10. Which one of the following is the right way to clone an object?


 

Start practicing “1000 MCQs on PHP”, and once you are ready, you can take tests on all topics by attempting our “PHP Test Series”.

Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.