menu

PHP OOPs Concepts


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

this

$this

parent

static


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

Abstraction

Inheritance

Encapsulation

Polymorphism


3. Which keyword is used to declare a method as static in PHP?

static

function

self

$this


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

Object Oriented Programming

Online Order Processing

Operating Oriented Programming

Object Oriented Python


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

this

self

static

parent


6. Which OOPs concept is used to restrict access to properties and methods of a class?

Encapsulation

Inheritance

Polymorphism

Abstraction


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

Encapsulation

Inheritance

Polymorphism

Abstraction


8. Which keyword is used to access a static property or method of a class in PHP?

self

static

$this

parent


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

Polymorphism

Inheritance

Encapsulation

Abstraction


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

Abstraction

Encapsulation

Polymorphism

Inheritance