PHP Anonymous functions with examples in detail

PHP Anonymous functions

PHP Anonymous functions In this chapter, you will learn another useful feature of PHP which is PHP Anonymous functions. An anonymous function is simply a PHP function but as its name suggests, it’s anonymous, which means it’s not having any name. Then how can we use it? But first, let’s see how it looks. A normal … Read more

PHP Magic methods – Magic methods in PHP – Detailed tutorial

PHP Magic methods

What are magic methods in PHP? PHP Magic methods are a special kind of method defined in OOP PHP,  which gets called automatically when a certain event occurs on an object of a class. PHP Magic methods names start with double underscores ( __ ). We have already seen such two methods __construct() and __destruct() … Read more

PHP Type Hinting with interface and abstract class

PHP Type Hinting with interface and abstract class

PHP Type Hinting In the last chapter, we have seen the PHP type hinting for arrays and objects. In this chapter, we will see how in some situations object type hinting would not work, and then, in that case, we can use abstract class or interface type hinting. The PHP Type hinting for the interface … Read more

Polymorphism in PHP with example in OOP

Polymorphism in PHP with example What is Polymorphism in Object oriented PHP? Polymorphism in PHP is one of the most important concepts in application development. Let’s see Polymorphism in PHP with example. The word Polymorphism means many forms or many types. In object oriented PHP’s Polymorphism principle, different classes can have the same method names which … Read more

Inheritance in PHP Object Oriented Programming

Inheritance in PHP What is Inheritance? In general, Inheritance in PHP is a concept of relationships. In simple English meaning of inheritance is when a child acquired any properties or qualities from a parent then it will be called as an inheritance. In the same way, relationships can be created between classes. In classes also … Read more

Public and Private in PHP-Access Modifiers in PHP OOPs

Public and Private in PHP What are the access modifiers and what are there use? We have already used “public” access modifier in our previous chapters in class properties and methods. In this tutorial, you will learn more about the Public and Private in PHP more specifically what are the access modifiers in PHP. In … Read more