Although PHP Enumerations are meant to provide an easy and elegant solution to work with a predefined set of values, these classes are often misused, resulting in a lack of consistency due to the introduction of all sorts of methods that increase their complexity. In this article, we are going to go through some practices (both good and bad) with the goal of clarifying the understanding of these types of objects to help you build a more resilient and consistent codebase.
PHP
PHP version stats: July, 2026
Brendt shares fresh Packagist-based PHP version stats for July 2026: PHP 8.4 is now the most-used version, while PHP 8.5 reached 16% adoption after six months. He also notes that package minimum requirements still lag Read more…