php8

  • Scaling an Image in PHP: Examples and Techniques

    Image scaling is a common requirement in web development, allowing you to resize and adjust the dimensions of an image according to your needs. PHP provides various functions and libraries that enable you to scale images easily. In this article,

    ...
  • Singleton Pattern and its implementation in PHP

    The Singleton pattern is a creational design pattern that ensures a class has only one instance and provides a global point of access to that instance. It is commonly used when there is a need to have a single instance of a class throughout the

    ...
  • SOLID principles in PHP and examples of how to implement them

    The SOLID principles are a set of design principles that promote software development practices that result in maintainable, flexible, and scalable code. Modern PHP Code is implemented based on these.

     

    SOLID is

    ...
  • Unlocking the Power of PHP Unit Testing: Key Use Cases and Examples

    In the world of web development, ensuring the quality and reliability of your PHP code is crucial. One effective way to achieve this is through unit testing, a technique that involves testing individual units of code to verify

    ...
  • Using DTOs in PHP Symfony

    DTOs (Data Transfer Objects) are a special type of objects that are used for carrying over Data between processes. These not only holds the data but the data structure and the data types of each one of the elements of the object. You can use

    ...
  • Vagrant Virtual Machine with CentOS 7, Nginx, MariaDb, NodeJs and PHP 8

    Once you have up and running Vagrant and VirtualBox in your machine you need to follow these steps to create a VM and install all necessary dependencies to run PHP Projects.

    UPDATE: I have updated the vagrant file to use

    ...
  • What is a Linked List and how to implement it in PHP

    A linked list is a data structure that consists of a sequence of nodes, where each node contains a value and a reference (or link) to the next node in the sequence. Unlike an array, which stores elements contiguously in memory, a linked list

    ...
  • What is a listener in Symfony Framework

    In the Symfony Framework, a listener is a class that listens to a specific event and executes a specific code when that event occurs. Listeners are used extensively in Symfony to implement various functionalities in a decoupled and reusable

    ...
  • What is Dependency Injection Pattern and examples on implementation in PHP

    The Dependency Injection pattern is a design pattern that focuses on providing dependencies to an object from external sources rather than having the object create or manage its dependencies internally. It promotes loose coupling between

    ...
  • What is oAuth How it works and example implementation in PHP

    OAuth (Open Authorization) is an open standard authorization framework that enables third-party applications to access the resources of a user on a web service without requiring the user to share their credentials (e.g., username and password)

    ...
  • What is the Bridge Pattern and How we can implement it in PHP

    The Bridge pattern is a structural design pattern that decouples an abstraction from its implementation, allowing them to vary independently. It provides a way to handle complex class hierarchies by separating them into two separate hierarchies:

    ...
  • What is the Factory Pattern and how its implemented in PHP

    The Factory pattern is a creational design pattern that provides an interface for creating objects but delegates the actual object instantiation to subclasses or specialized factory methods. It encapsulates the object creation logic, promoting

    ...
  • What is the Observer Pattern and how its implemented in PHP

    The Observer pattern is a behavioral design pattern that allows objects to establish a one-to-many dependency relationship. In this pattern, an object, known as the subject or observable, maintains a list of dependents, known as observers, and

    ...
  • What is the Strategy Pattern and how its implemented in PHP

    The Strategy pattern is a behavioral design pattern that enables an object to dynamically change its behavior at runtime by encapsulating different algorithms or strategies within interchangeable objects.

    It promotes the principle of

    ...
  • Working with Attributes in PHP 8+

    PHP 8 introduced a new feature called attributes, which provide a way to add metadata or annotations to PHP code. Attributes allow developers to attach additional information to classes, methods, properties, parameters, and

    ...