Skip to main content

Posts

Showing posts from March, 2025

Docker Installation and Management

 # Step 1: Uninstall older versions of Docker if they exist sudo dnf remove docker \                 docker-client \                 docker-client-latest \                 docker-common \                 docker-latest \                 docker-latest-logrotate \                 docker-logrotate \                 docker-engine # Step 2: Add Docker's official repository sudo dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo # Step 3: Install Docker Engine sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin # Step 4: Start and enable Docker service sudo systemctl start docker sudo systemctl enable docker # Step 5: Verify that Docker...

OOP concept Interface VS Abstract class in php

 What is the key difference between Interface and Abstract Class The key difference lies in purpose and approach of their usage.  1. Key Differences Between Interface and Abstract Class Feature Interface Abstract Class Method Implementation Only method signatures (no implementation) Can have both abstract and concrete (implemented) methods Properties Cannot have properties (variables) Can have properties (variables) Constructor Cannot have a constructor Can have a constructor Multiple Inheritance A class can implement multiple interfaces A class can extend only one abstract class Access Modifiers All methods must be public Methods can have public , protected , or private visibility Use Case Defines a contract that multiple classes must follow Provides a base class with some common functionality Interface An interface in php is a contract, set of rules that classes need to follow. Interface define set of method that classes must impliment. Interface only contain signature/dec...