Month: March 2021

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   >>

PHP Encapsulation

Encapsulation is used to bind the data using get and set method or hide the values to prevent from unauthorized parties' to directly access them. For encapsulation, we generally use the concept of visibility (public, private, protected). Public...
READ MORE   >>

Recent Comments

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