Do one thing at a time

Is your code trying to do too much? Dramatically improve the design of your system by focusing each component on a single responsibility.

A PHP Enum class

Here’s one approach that addresses the current lack of a native PHP enum class. An Enum type allows you to define and enforce a limited set of values, and...