PHP is a Computer Language that embraced OOP (Object Oriented Programming) and currently it fully supports all OOP Principles and Patterns. This makes PHP a very powerful, yet friendly Programming Language. Mastering OOP in PHP requires to fully
Understanding key Object Oriented Programming concepts is required to be able to produce Modern, High Quality PHP Software Applications that stick to OOP Best Practices and Principles.
Prerequisites:
As I was mentioning in past Article, understanding key Object Oriented Programming concepts is required to be able to produce Modern, High Quality PHP Software Applications that stick to OOP Best Practices and
In the world of computer programming, building complex software systems often involves managing relationships between objects. Object inheritance is a fundamental concept that allows developers to create hierarchical relationships between
Object Oriented Programming is about writing code using constructs called objects. We can say that everything can be called an object if we stick to the accepted definition by the Language Academia1. To understand the
Once we understand the concept of Software Objects taking physical real life examples as I explained in previous Article, then we need to dive into their characteristics and behavior before we can effectively write Object Oriented
Object Oriented Programming is about writing code using Objects. Once we understand the concept of an "Object" and its main Principles, we are ready to start writing OOP code.
Date calculations are probably one of the most challenging requirements for PHP Developers. Some of these are timezone calculations. Here are some examples on how to use the DateTime and DateTimeZone classes available in PHP core to deal with
You can deserialize complex nested Xml files into DTO Classes in Symfony in very simple steps using the JMS Serializer Bundle. Just follow these steps:
JMS Serializer Bundle
Step 1: Install
Implementing the Publish-Subscribe (Pub-Sub) pattern in PHP involves creating a system where publishers send messages (events) to a central event bus, and subscribers receive and handle those events. This pattern decouples the publishers from
One of the most powerful features of Symfony Framework is its Event Driven Architecture. It is very easy and simple to implement PHP logic that responds to certain events during the request - response cycle.
Arrow functions, also known as short closures, were introduced in PHP 7.4 as a more concise syntax for defining anonymous functions. They provide a shorthand way to create simple, one-line functions without the need for the function keyword or
In PHP, autowiring refers to a technique for automatically resolving dependencies when instantiating classes. To implement autowiring in PHP, you can use a dependency injection container, such as PHP-DI package, which provides autowiring out of
Autowiring in PHP refers to the ability to automatically resolve dependencies of a class without the need for manual instantiation or injection of dependencies.To implement autowiring in PHP using the ReflectionClass, you can follow these
In PHP, a closure is an anonymous function that can access variables outside of its own scope. It "closes" over those variables and retains their values even if they are no longer in scope. This allows closures to have a persistent state and
In PHP, a DTO (Data Transfer Object) is a design pattern that is used to transfer data between different layers or components of an application. It acts as a container or data structure that holds the data.The
Upgrading old PHP code to the new 8 series could be a very difficult task, but its absolutely necessary. Main reasons are security, performance and compatibility. I will try to document here things I haven't found
array_column(array, column_name) is another very powerful function available in PHP. It allows to extract all the values from the specified column from a multi-dimensional array without looping into each one of the nested arrays. These are the
array_filter(callable, array1) is another very powerful function available in PHP. Basically is a way to remove elements from an array that does not pass given rules in the callable function. These are the most common ways to implement this
array_map(callable, array1,array2,array3,...) is a very powerful function available in PHP. Basically is a way to transform one or more arrays applying the logic in the callable function and output the result as another array. These are the most
Page 1 of 2