How to get all twig variables from template

This is how I use to debug any twig template and it's variables. Just include into your twig template and pass variable = object | array | null

{% partial 'debug' variable=post %}

Programming principles

While I have started my journey to the Programming world, I come accross many principles which I am list down here for easy understanding.

Nested set pattern for laravel’s eloquent orm

For Nested Set pattern , I would suggest to follow this links

The theory behind, a TL;DR version

An easy way to visualize how a nested set works is to think of a parent entity surrounding all of its children, and its parent surrounding it, etc. So this tree:

Zend framework quick guide

Quick overview on Zend Framework 3 with enough details.

  • Zend\EventManager component allows to send events and register listeners to react to them.

  • Zend\ModuleManager. In ZF3, every application consists of modules and this component contains module loading functionality.

  • Zend\ServiceManager. This is the centralized registry of all services available in the application, making it possible to access services from any point of the web site.

How to switch default php version in linux?

Problem :- How to switch default php version in linux ?

Platfom :- Linux


Check which php versions are available with system

    sudo update-alternatives --config php

Solid principles

In object-oriented computer programming, SOLID is a mnemonic acronym for five design principles intended to make software designs more understandable, flexible and maintainable.


    S — Single responsibility principle.
    O — Open closed principle.
    L — Liskov substitution principle.
    I — Interface segregation principle.
    D — Dependency Inversion principle.

Complete guide to php performance

I have a list of server config , tweaks and tricks for improving php performance.   (1) A one-page opcache status page GitHub Link   Direct download 

Laminas request in detail

How to access route, post, get etc. parameters in Laminas Framework , Formally known as Laminas framework.

Magento2 directory permission

Here is the quick developer permission for your magento root directory. Just go to your magento root directory and apply following commond using your terminal.