Readonly or private(set)
Explains the differences between PHP's readonly properties and private(set) asymmetric visibility, discussing their use cases for creating immutable data objects.
Explains the differences between PHP's readonly properties and private(set) asymmetric visibility, discussing their use cases for creating immutable data objects.
Explains PHP 8.3's new feature allowing readonly properties to be reinitialized during object cloning, specifically within the __clone method.
A concise overview of PHP 8.1's new features, including enums, readonly properties, fibers, and array unpacking, demonstrated through code examples.
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.