pTutorial

New way to learn Programming

PHP 5 Tutorial

PHP Object oriented Programming

Object oriented Programming is a kind of Programming approach in which programmer defines not only the data type of data structure, but also defines the types of operation that can be applied to the data structure. That makes building complex modular and reusable application easily.

PHP Object Oriented strategy offers mainly these advantages:-

  1. Easier to understand: Object oriented approach makes it possible to think of programs in terms Of everyday objects.
  2. Reusability: You frequently need the same types of data in different places in the same application. For example a school management application that manages the student's details, attendance, result and others. So you can create a student class and access anywhere you want to use this class data member and member function.
  3. Improved reliability: Object Oriented code is easily expanded and modified.
  4. Easy to maintenance: Object oriented code is easier to maintain because it follows somewhat strict coding conventions and is written in a self-explanatory format.
  5. Efficiency: The object oriented Programming approach is originally developed for better efficiency and ease of the development process.

PHP and OOP

PHP offers general object-oriented features, it is not yet a full-featured Object oriented Programming language, like Java.

Unlike OOP, PHP does not explicitly offer the following object-oriented characteristics:-

  • Multiple inheritance
  • Constructor chaining
  • Class abstraction
  • Method overloading
  • Destructor
  • Polymorphism
.

PHP has added some Object Oriented Programming features and Object Oriented Programming became possible with PHP 4. With the introduction of PHP 5.


QUOTES OF THE DAY

The ballot is stronger than bullet.

LIKE ON FACEBOOK

+1 ON GOOGLE

SHARE ON TWITTER