Null safe operator for class in PHP

The null safe operator (?->) in PHP is a feature introduced in PHP 8.0. It allows you to call methods or access properties on an object only if the object…

Short-circuiting in PHP

Short-circuiting in PHP refers to the behavior of logical operators (&&, ||, and their shorthand equivalents and and or) where the evaluation stops as soon as the final outcome of…

What is type hinting in PHP?

Type hinting in PHP refers to the practice of specifying the expected data types for function arguments, return values, and class properties.

MVC

Custom MVC framework Logic

There are 5 pillars of any MVC framework. 1) Router2) Validator3) Database4) Template Engine5) Container

Abstract Class vrs. Interface

OOP Pillars

The 4 pillars of OOP are 1) Encapsulation 2) Abstraction 3) Inheritance & Polymorphism. Here are some basic explanation of each why to use and where to use.

What is namespace in PHP?

If you have same named function in functional programming, it’s not accepted but yes you can create same named function in different class. Now what about the class name? What…

callbackfn

Anonymous function in PHP

Anonymous function means you can create a function without declaring its name and you can write a piece of code into it’s definition.

How JS & PHP related with each other?

We found a PHP script is always having a JS code. A basic PHP applications must having JS interaction in script. On very basic level there are 4 types PHP…