Published
Dominik Chrástecký - Blog New in PHP 8.5: Asymmetric Visibility for Static Properties New in PHP 8.5: Asymmetric Visibility for Static Properties- 1 min read
New in PHP 8.5: Asymmetric Visibility for Static Properties

A small but meaningful update in PHP 8.5 introduces asymmetric visibility for static properties.
This minor addition brings asymmetric visibility—already available for instance properties—to static properties as well.
Previously, this was valid syntax:
final class PublicPrivateSetClass {
public private(set) string $instanceProperty;
}
As of PHP 8.5, you can now do the same with static properties:
final class PublicPrivateSetClass {
public private(set) static string $staticProperty;
}
While not the most groundbreaking feature, it improves consistency in the language—which is always a welcome change.
- New in PHP 8.5: Marking Return Values as Important
- New in PHP 8.5: Attributes on Constants
- New in PHP 8.5: Levenshtein Comparison for UTF-8 Strings
- New in PHP 8.5: Final Promoted Properties
- New in PHP 8.5: The Pipe Operator
- New in PHP 8.5: Closures as Constant Expressions
- New in PHP 8.5: Small Features, Big Impact
Comments
I like this feature (for both static and non-static properties). It just reads kinda cringe with both the “public” and “private” keywords for the same property.
I like it as well, recently had one use case where it would have been the best solution, sadly php-cs-fixer chokes on that so I had to do it with property hooks.