Month: March 2021

PHP Interface

Interfaces allow us to specify what methods/functions of a class should implement. It’s quite easy to use a variety of different classes in the same way. When one or more classes use the same interface, it is referred to as...
READ MORE   >>

PHP Polymorphism

There are two types of Polymorphism; i.e.  Compile time (function overloading)Run time (function overriding) But PHP "does not support" compile time polymorphism, which means function overloading and operator...
READ MORE   >>

PHP Inheritance

Way1 to inherit one class from another using the keyword extends <?php class Course{                 protected...
READ MORE   >>

PHP Abstraction

Code below defined an TV class. We cannot do much with it except turning it on and off. The class TV is an abstraction of a real TV in a very simple use case. <?php class TV {       private $isOn =...
READ MORE   >>

Recent Comments

    • Copyright © 2020 (Er. Shairy Kalra). All Rights Reserved