PHP – What is OOP?

Last Updated: July 31, 2021

You can use two programming methods in PHP

  • Functional Programming
  • Object Oriented Programing (OOP)

Object-oriented programming (OOP) is a programming paradigm based on the concept of Object. You can represent the real world object in programming language.

From PHP 5 , you can develop OOP code.

You have to understand Class and Object properly if you are beginner to OOP

What is Class?

Class is a blueprint or a set of instructions to build a specific type of object.

You can consider the Mobile Phone as the class and objects will be iPhone 7, iPhone X,Samsung Galaxy F22 etc.

In object-oriented programming (OOP), objects are the things you think about first in designing a program