
PHP 7.4: Setters and Getters have died - kiyanwang
https://itnext.io/php-7-4-setters-and-getters-have-died-2cefa996d26
======
ddtaylor
Getters and setters do more than just type enforcement. In specific they allow
for encapsulation where users of the class shouldn't be concerned with _how_
things are implemented. There may be complex relationships of members that
needs to be maintained and by not using a method to do the "set" operations
you are either tasking every consumer of the object with that burden or you
are making it impossible to change those relationships later without breaking
them.

