PHP Questions and Answers – Object-Oriented OOP – Part 1
This collection of PHP Multiple Choice Questions and Answers (MCQs): Quizzes & Practice Tests with Answer focuses on “Object-Oriented OOP”.
1. The concept of separating the user from the internal details of an application is known as_____________
A Abstraction
B Polymorphism
C Inheritance
D Encapsulation
2. The concept of creating objects based on pre-defined classes is known as_____________
A Class creation
B Class instantiation
C Object creation
D Object instantiation
3. Classes are the ___________ of objects.
A reference
B type
C blueprints
D instances
4. Objects are also known as _________.
A reference
B type
C blueprints
D instances
5. Class is a user-defined data type, which includes ______ methods and _______ variable?
A local, global
B global, global
C global, local
D local, local
6. How to defin a new class called “MyClass”?
A class MyClass ()
B class MyClass []
C class MyClass {}
D MyClass class{}
7. Object are created using _______ keyword?
A object
B create
C new
D obj()
8. To define a new class you start with the keyword ________ ?
A var
B class
C new
D function
9. Constructor is also called ______ function
A automatic
B find
C magic
D key
10. Which of the following built-in functions is used to determine object type?
A is_a()
B type()
C obj_type()
D is_obj()