menu

PHP OOPs Concepts


1. Which OOPs concept is used to define a blueprint for a class?

Abstraction

Inheritance

Encapsulation

Polymorphism


2. Which keyword is used to refer to the current instance of a class in PHP?

self

object

this

new


3. What is the full form of OOP in PHP?

Object Oriented Programming

Online Order Processing

Operating Oriented Programming

Object Oriented Python


4. Which keyword is used to refer to the parent class of a class in PHP?

this

self

static

parent


5. Which keyword is used to declare a class in PHP?

object

new

class

this


6. Which OOPs concept allows objects of different classes to be treated as if they were objects of the same class?

Polymorphism

Inheritance

Encapsulation

Abstraction


7. Which keyword is used to access a property or method of a class within the class itself?

this

$this

parent

static


8. Which keyword is used to prevent a class from being inherited by other classes in PHP?

$final

final

abstract

private


9. Which OOPs concept is used to create objects from abstract classes and interfaces?

Abstraction

Encapsulation

Polymorphism

Inheritance


10. Which OOPs concept is used to hide the implementation details of a class?

Encapsulation

Inheritance

Polymorphism

Abstraction