Code inventories Code inventories are lists of items iof the same type. It is also the process to making such list. The inventory is meant to provide a complete view over available ressources. Translated to code, PHP or else, it is an auditing process that collects code structures of one type, for further analysis. For […]
Move that foreach() inside the method Several PHP functions work with single or multiple values. For example, array_merge(), which merges several arrays into one. Or, isset(), which checks simultaneously the existence of several variables. str_replace() and preg_replace_callback() also come to mind. This is a good place to move that foreach() inside the method. This approach […]
Const behavior in PHP 7 I always thought const behavior to be like class. Well, of course, beside the obvious differences, const and class were compile-time structures. They are complete at compilation, and could be op-coded and cached. This is unlike the slower define() function (for const), which requires PHP execution to be creating constants. This […]