easy solution web : OOPS in PHP
PHP

Understand the concept of PHP traits with examples

 What is PHP Traits? The concept of Traits is introduced in PHP 5.4, which is basically a group of functions which can be used in any other classes. To overcome the problem of Multiple Inheritance, PHP introduced traits which is very much welcomed by PHP community. It let you reuse your code in the much […]

easy solution web : OOPS in PHP
PHP

Understand the concept of Interface in PHP

What is Interface? An Interface contains methods without body i.e {}. Means, there we get only the declaration of the function, not the definition of the function. A class which uses interface have to implement all of its methods declared in the interface. Interface restricts the user to define all the method declared in the Interface in […]

easy solution web : OOPS in PHP
PHP

Concept of Abstraction in PHP

We have completed the understanding of Encapsulation and Inheritance. Now let’s move on to the concept of Abstraction in PHP. So how can we define Abstraction? In one way hiding unnecessary details or implementation about the functionality from the user is called  Abstraction. For Example:- We all use the functionality of mobile phones like a […]

Easy Solution Web: constructors and destructors in php
PHP

Concepts of Constructors, Destructors and its types in PHP

In this section, we will talk about constructors, destructors, their types and some important characteristics Constructors Let’s start with some common characteristics of Constructor We can define a constructor method by defining the __construct method inside the class. It runs only one time while creating an Object from the Class. It is the suitable place to initialize […]

easy solution web : OOPS in PHP
PHP

Class and Object in PHP

How can we describe “Class and Object” According to Wikipedia “In object-oriented programming, a class is an extensible program-code-template for creating objects, providing initial values for state (member variables) and implementations of behavior (member functions or methods).” So class basically defined the properties and behavior of a object which can be termed as a “template for object”. According to the defined […]