PHP in 2022
An overview of modern PHP features in 2022, including PHP 8.1's enums, readonly properties, and the growing static analysis ecosystem.
An overview of modern PHP features in 2022, including PHP 8.1's enums, readonly properties, and the growing static analysis ecosystem.
Explains PHP 8.1's new readonly properties for creating immutable data transfer and value objects, comparing code examples from older PHP versions.
A developer's overview of impactful new features in PHP 8.1, including enums, array unpacking, and readonly properties.
Explains the limitation of cloning readonly properties in PHP 8.1 and introduces a package to work around it using a `with()` method.
Explores userland enum implementations in PHP before native support arrived in PHP 8.1, discussing the myclabs/php-enum package and its limitations.