What is Object Oriented Programming?
Object-oriented programming concept is a programming concept in which all properties and behavior of entities are grouped into a single entity called a class. This style is considered much more advanced and efficient than the Procedure style of programming. It gives us modularity, reusability and better organization of code.
Follow the below tutorial to learn about PHP Object Oriented Concepts.
Object oriented programming concept is a programming concept in which all properties and behavior of entities are grouped into a single entity called a class. This style is considered much more advanced and efficient than the Procedure style of programming. It gives us modularity, reusability and better organization of code ...Read More
In the previous post, we introduced Object Oriented Programming in PHP. We discussed the difference between Class and Object. Also, we learned to create a basic Class in PHP. In this article, we will discuss Access Modifiers. If you are new to Object Oriented Programming, I would recommend you to ...Read More
We discussed public and private Access Modifiers earlier. Sometimes, we require access to a Class's members without creating an object. In this situation, we use Static Keyword in PHP. Defining a class property static makes it accessible without instantiating an object of the class. In this article, we will discuss ...Read More
In my previous post on Object-Oriented Programming, we learned about Access Modifiers. Let's take the discussion forward to some advanced concepts. In this article, we will discuss Constructors. If you are new to Object Oriented Programming, please read my beginner post on it first. Class Constructors A constructor is a ...Read More
Inheritance is one of the most important concepts of Object-Oriented Programming. It allows a class to inherit some properties of another class. It comes very useful when we want to build a class upon an existing class. In this article, we will discuss Inheritance in PHP. If you are new ...Read More
We discussed Inheritance in PHP in an earlier post. We learned that a Child Class can inherit the properties of a Parent Class. Function Overriding allows the Child Class to have the same method which already exists in the Parent Class. By overriding the method we can modify the definition ...Read More
Constants are a bit different than regular variables in PHP. Class Constants are immutable properties. Therefore, you cannot change the value after defining it for the first time. In this article, we will discuss Class Constants in PHP. What are Class Constants in PHP? It is possible to define Class ...Read More
A class can inherit properties from a parent class. However, it can only inherit public and protected properties. Also, the child class can override methods of the parent class. PHP introduces the Final Keyword, which prevents the child class from overriding methods of the parent class by prefixing it with ...Read More
A Child Class can inherit properties from a Parent Class. Also, you can directly create an object of a Parent Class. However, you can’t instantiate an object of an Abstract Class directly. In this article, we will discuss Abstract Classes in PHP. Also, we will discuss their implementation along with ...Read More
An Interface in PHP allows you to create methods which a class must implement, without giving any details about its implementation. They resemble abstract methods in an abstract class. However, unlike Abstract Classes you don't need to provide the implementation of methods in an Interface. In this article, we will ...Read More
View All Articles >