Learn Object-Oriented Programming in PHP
About Lesson

OOP means Object Oriented Programming.

PHP introduced object-oriented programming features since version 5.0. Object-oriented programming is one of the most popular programming paradigms based on the concept of objects and classes.

You may be familiar with the usual procedural programming paradigms in php which is not totally different from the OOP  paradigms.

Procedural programming involves the creation of procedures or functions designed to operate on data, whereas object-oriented programming revolves around the creation of objects that encompass both data and functions.

Object-oriented programming has several advantages over procedural programming:

  •         Executing tasks in an (OOP) paradigm tends to be more efficient and straightforward.
  •         OOP offers a well-defined structure for organizing programs.
  •         OOP helps to keep the PHP code DRY “Don’t Repeat Yourself”, and makes the code easier to maintain, modify and debug
  •         OOP makes it possible to create fully reusable applications with less code and shorter development time

The “Don’t Repeat Yourself” (DRY) principle is about reducing code repetition. You should extract the codes that are common for the application, place them in a single place, and reuse them instead of repeating them.

0% Complete