menu

PHP OOPs Concepts


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

Abstraction

Encapsulation

Polymorphism

Inheritance


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

this

$this

parent

static


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

static

function

self

$this


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

$final

final

abstract

private


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

Encapsulation

Inheritance

Polymorphism

Abstraction


6. Which OOPs concept allows one class to inherit properties and methods from another class?

Inheritance

Encapsulation

Polymorphism

Abstraction


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

Object Oriented Programming

Online Order Processing

Operating Oriented Programming

Object Oriented Python


8. Which keyword is used to create a new instance of a class in PHP?

this

class

object

new


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

self

object

this

new


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

self

static

$this

parent