Design Patterns in PHP 8: State
“Hi there! State design pattern is a behavioral design pattern that enables an object to change its behavior when its internal state changes. This pattern is useful when an object’s behavior is dependent on its state, and it must change its behavior at runtime based on changes in the state.”
read »