PHP Constants, Enums, and Readonly: One Decision Tree for 10 Tools
From define to asymmetric visibility — a three-axis mental model and a concrete decision matrix for getting immutability right in modern PHP.
Tag
Object-oriented design: interfaces, dependency injection, value objects and boundaries, covered in posts, notes and practical examples.
There are 5 posts with this tag.
From define to asymmetric visibility — a three-axis mental model and a concrete decision matrix for getting immutability right in modern PHP.
Design patterns are a tool, not a goal: when to use which pattern in PHP, where they pay off, and the signs that they are creating unnecessary complexity.
Why naming is not merely a style choice, but a design decision in its own right — patterns I have observed over the years.
How I use interface definitions and dependency injection in PHP to build loosely coupled classes, illustrated with practical examples.
How I apply SRP, the S in SOLID, to PHP classes with concrete examples, moving beyond abstract theory and asking where it is reasonable to stop splitting.