Access Modifiers : Public vs Private

In the last chapter we discussed chaining methods and properties, and how to use them. Today we will learn an interesting topic which is Access Modifiers : public vs private.  From the starting of the tutorial we were using public access modifiers . The reason behind using the public access modifier is to use the public methods and property without any

Continue reading

Magic methods and constants in php

In the last lesson we discussed the access modifiers (public vs private) and their uses. Today we will learn about magic methods and constant in php. Why we call them magic method and magic constant and how to identify them. Since OOPS has several magic methods and magic constants which reduces the programming code. that is why it is referred as magic

Continue reading

Inheritance in php

In the last lesson we have learnt about Magic methods and constant . Today we will learn about inheritance. So let’s start with the question what is inheritance and their benefits and uses. By definition : In object oriented programming Inheritance is a concept which is used to achieve the public methods and properties from another class(i.e child class). Inheritance

Continue reading

abstraction in php

In the last lesson we have learnt abut one of the principle of Object Oriented Programming i.e Inheritance. Today we are going to learn about OOPs second principle i.e Abstraction. So let’s start with the meaning of abstraction. In general term abstraction means incomplete or something which is removed from original thing. In Object oriented concept, Abstraction provides a standard

Continue reading

interface in php

In the last lesson we learnt about abstract classes and today we will learn about an important topic of object oriented programming i.e Interface. Interface is similar to abstract classes while there are some difference in them. Declaration and implementation of Interface. Syntax :  we use keyword interface before the class name.

we use interface keyword before the class

Continue reading

Polymorphism in php

In the last lesson we learnt about interface and how they are different to abstract classes. Today in this lesson we will learn about a very important topic which is Polymorphism What is polymorphism in php ? Lets break the word and find this : Polymorphism word is made of two words i.e (Poly + morphism). Poly means many and

Continue reading

Static methods and properties in php

In the last lesson we learnt about Polymorphism,  In this lesson, today we are going to learn about static methods and properties . Before moving further let’s first discuss about the word Static. Static means immovable or stable. It means when we declare a variable or method as static its value remains the same after its execution. Syntax to declare a

Continue reading

Traits in php

In the last lesson we learnt about static method and properties. Today i am going to discuss about traits in php. What is Traits ? In PHP Traits are a mechanism of code inclusion or code re-usability. It is similar to (include, require). There might be a question striking in your mind that, we use inheritance for this purpose. Yes,

Continue reading

PDO (PHP Data Objects)

In the last lesson we learnt Traits . In this lesson we will learn mysql database connection using PDO and we will perform some basic sql queries like (insert, select, update, delete). You might be thinking at this time that if mysql, mysqli are already available then why to learn this PDO ? Since you also know for everything there is

Continue reading

PHP String

In this tutorial today we will play with strings and php string functions. So before starting the topic first understand what is string in php. Definition : String is a sequence of any type of characters, for example (” Hello phpkeeda “). This  is a sequence of characters. How strings are declared in php In php, Strings are declared inside

Continue reading