Larry Garfield
Anything worth doing is worth doing well.
Anything worth doing well is worth teaching others to do well.
Author of Thinking Functionally in PHP, now on LeanPub: https://leanpub.com/thinking-functionally-in-php
- 0 Posts
- 1 Comment
Joined 8 years ago
Cake day: August 17th, 2018
You are not logged in. If you use a Fediverse account that is able to follow users, you can follow this user.

@dominik False. Readonly properties can be set outside the constructor. In 8.3 they can only be set within the class (private scope). In 8.4, they’re protected set by default, but you can change it, even make them public write.
The “only in the constructor” thing was invented by PHPstan and Psalm. It’s not part of the language. It’s a stupid add-on that 2 dudes came up with for their tools and refuse to change.