A few extra steps with PHP’s Override attribute The Override attribute was introduced in PHP 8.3. It is a new attribute, that marks methods that must be overriding a parent’s class method: one of the parent must define a method with the same name. When this is the case, all is fine. If no parent […]
All String Concatenations in PHP In PHP, string concatenation is a common operation used to combine multiple strings into a single one. There are no less than 4 ways to combine several strings into one. Each have it own usage, adapted to each context, and it is a good coding skill to know them all. […]
A story of compact() and extract() Compact() and extract() are two sides of the same coin. They are also a good part of the PHP story, with their close cousins, the variable variables. Let’s review the usage of compact() and extract() and see how they can make it into the future of PHP. From variables […]
A PHP Dictionary In the vast and dynamic ecosystem of PHP development, newcomers often find themselves grappling with a plethora of unfamiliar terms and concepts. From functions and methodologies to frameworks and patterns, navigating the PHP landscape can sometimes feel like learning a new language altogether. That’s why why we are introducing a PHP Dictionary. […]
Common services with PHP applications PHP applications all have *.php files. Then, there are other files, needed for configuration, templating, or also external services. These files gives a measure of the popularity of the common services with PHP applications. The most famous is certainly composer, which is now present in virtually every PHP applications: over […]
All the recursive Functions in PHP A recursive function is a function that calls itself, in order to solve a problem. This type of function is often used in situations where a problem can be broken down into smaller, similar yet smaller problems. The function keeps calling itself with modified arguments until a base case […]
Features that make PHP go forward Open source projects often support older PHP versions, and sometimes, really much older. At some point, they take the decision to move on. With the drop of older versions, (relatively) new features can be used to modernize the sources. These features are the ones that make PHP go forward: […]
The Quirks and Oddities of the Language: PHP Tips Archive PHP, the server-side platform that powers the web, is known for its versatility and ease of use. However, beneath its seemingly straightforward syntax lies a world of peculiarities, oddities, and unexpected behaviors. If you’re looking to explore the quirks of PHP in a fun and […]
How to Clean After Oneself in PHP While creating efficient and functional code is crucial, it’s equally important to ensure proper finalization of ressources. There are many situations where it is critical to free a lock, close a connexion or complete a file. In this post, we’ll explore three essential features that help code ensure […]
The Forbidden PHP Features Encyclopedia Within the vast realm of PHP development, certain features have incurred the disapproval of various developers, leading to their outright exclusion from conscientious coding practices. This comprehensive encyclopedia serves as a curated catalog, shedding light on the forbidden features that have faced scrutiny and are best avoided in the pursuit […]