Speeding up array_merge()

Speeding up array_merge() While doing a crowd review of naval battle code at @afup_rennes (in French), it appeared that the ‘no array_merge() in loops’ rule was known but not clear. Indeed, why is it that this function in particular, should be avoided in loops. Hence, this article, with a journey to memory management, coding and […]

Variable Variables Usage

PHP variable variables

Variable Variables Usage I call them ‘variable variables’, because it makes a funny sentence. What? Aren’t variables supposed to …vary, change, get altered? Indeed, they do. Yet, there are the ‘dynamic variables’ in PHP, which have been around as long as PHP itself (at least, PHP 3.+). Recent tutorials around the web, like Dynamic variables […]

I scream, you scream, we all scream for @ no scream operator

I scream, you scream, we all scream for @ @, no scream operator, is a classic PHP operator, meant to suppress error displays locally. It is a staple of PHP code, in use in over 65% of PHP repositories : 2 repositories out of 3. Yet, it is widely recommended avoiding using it. Indeed, are […]

Exakat 1.5.5 review

Exakat 1.5.5 Review Exakat 1.5.5 is the sinkterklas version : it brings a lot of speed, reports and analysis on its boat, from Spain. Seriously, Exakat 1.5.5 now reports your HTTP headers for unsafe configuration; it also suggests speed up tricks for fputcsv(), and it recommends using the file() functions, instead of fileget_contents(). Then, Exakat […]

EPIC : Exakat PHP Index of Coding (August 2018)

Exakat PHP Index of coding Not using @ is the poster child of good practices. It’s also looked upon, as an impossible goal. Did you know that the @ operator is only merely used by 50% of PHP applications ? Same for parenthesis with include and co : don’t use them, like 50% of the […]

5 usages of static keyword in PHP

5 usages of static keyword in PHP Static is a PHP keyword with many usages. It is almost universally used, though there are many variations of it. Let’s review all the five of them : static method static property static closure static variable static as a classname Static method The most common usage of static […]