Lazy class constants in PHP: fast by design, sometimes surprising PHP has class constant, which are named literals. It also supports static constant expressions, where the value is not always a literal. Rather, it’s an expression that PHP doesn’t evaluate immediately. PHP evaluates it the first time the code needs it. This is the concept […]
Top 100 most used PHP constants Here is the top 100 PHP constants : it is the list of the most often used PHP native global constants. The classes are ranked in order of project frequency. In a corpus of 3000 OSS projects, the PHP native constants were detected. They may be used directly E_ALL […]
Literal candidates for constants Literals are hard coded values in the source. Once they are written, they can’t be changed without altering the source code. This is always fine, initially, while building the first implementations. Yet, later, it may arise that such literal have to be managed from different points of the code. This is […]



