Towards Powerful PHP Applications: WeakMaps and Their Practical Usage
Read more about PHP WeakMap data structure added with version 8. WeakMaps are helpful for memory management and avoid leaks.
Posts about PHP development.
Read more about PHP WeakMap data structure added with version 8. WeakMaps are helpful for memory management and avoid leaks.
Discover PHP's evolution, shifting focus from resources to objects, offering enhanced programming capabilities.
PHP Attributes were added with version 8. In this post, I give an overview and my opinion on where and how to use them.
Pure Intersection Types in PHP8.1 are a language feature to have more control over return and parameter types.
Fibers are introduced to PHP and are a elegant way to simulate parallel work. Read more about how they differ from threads and coroutines.
Finally enums were added to PHP. As a little time has passed, I'll give an overview & continue with personal thoughts about when & how to use.
Readonly properties are introduced with PHP 8.1. and allow creating immutable objects easier. Read here about the difference to getters/setters.
Mocking in unit tests is a powerful technique. This post addresses when and how to use mocks properly in PHP.
Traits are a newer concept to PHP and are a bad compromise to bypass single inheritance in PHP. Read more about Traits and alternatives.
Legacy code can be very challenging. However, the migration from legacy to modern frameworks such as Laminas (Zend) is very exciting.