Martin Mička
Oct 26, 2023

--

For starters, I think that all developers should practice information hiding / working with immutable (or readonly) properties and objects. This forces people to write better code, that is not opened to side-effects and doesn't invite bugs.

In PHP ecosystem, it's sometimes hard to reason, as these features started being introduced into the language not that long ago (this especially got better with readonly properties introduced in PHP 8.1 and onwards). PHP was (and to some extent still is) very prominent towards strict typing and other great concepts, that other mature object-oriented programming language enjoy for years now.

This article is a good example of how some of these concepts can save a lot of headache. I wish that PHP as a language continues to evolve in that matter, and that my fellow PHP developers will adapt these concepts more.

--

--

Martin Mička

I’m 27 years old, working as a Software Developer, mainly interested in new technologies and psychology.