PHP likes sorting too much

PHP likes to sort. Of course, there is sort(), ksort() and all the cousins. But, PHP actually sorts too much. My first encounter with the problem is the infamous array_unique(). Now, this is also affecting glob() and scandir(). I’m looking for others. Until then, check your code. array_unique() is also sorting array_unique() collects distinct values […]

Exakat @ PHP UK Conference the 16TH & 17TH FEBRUARY 2017 at The Brewery, London

PHP UK CONFERENCE 16TH & 17TH FEBRUARY 2017 The Brewery, London Exakat will animate two session “Last train for PHP 7.1” and “Static analysis saved my code tonight” at the PHP UK CONFERENCE the 16TH & 17TH FEBRUARY 2017 The Brewery, London. More information on the PHP UK CONFERENCE website  

Prevent multiple PHP scripts at the same time

Prevent multiple PHP scripts at the same time Like everything, it all started from a simple problem : how to prevent multiple PHP scripts at the same time. And turned into an odyssey of learning, full of evil traps and inglorious victories. In the end, it works, that’s the most satisfying and it possibly matters to […]

Automatically Enforcing Coding Reference For PHP

Last week, I ran into ‘PHP Dos and Don’ts aka Programmers I Don’t Like‘ on reddit’s PHP group. It features a list of 11 points that the author hates finding in PHP code. I am always keen on reading from such references : they always hold some some interesting insights, some tips and some more polemic […]

6 good practices for use in PHP

6 good practices for ‘use’ in PHP While reviewing code recently, I realized there are no guidelines for use. Every modern code do use ‘use’ (sic), as importing classes from composer or a framework is the norm. There are now quite a few variations in syntax for importing classes or traits. Although the impact on performance […]