The very useful variadic argument Variadic argument is the last argument of a PHP function : it is easy to recognize, with its ellipsis, both at definition and call time. This simple option is actually full of magic powers : it collects all incoming arguments into one parameter. Now, that is the base description of […]
PHP Advent calendar With PHP 7.2 out of the oven, literally yesterday, and the final month of the year starting, it is time for a PHP advent calendar. Every day until the 25th of December, we’ll reveal a new smelly treat. Yes, smelly treat, like a code smell. Common anti-patterns in PHP code leads to […]
Exakat 0.12.4 review Exakat 0.12.4 for your pleasure. Exakat has progressed on multiples fronts last week : PHP 7.2 is now fully covered for migration. Exakat has now a new favorite : and / &&; a new report for the ‘object’ keyword, a suggestion to reduce isset() calls, and a magic error with arrays. Finally, […]
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 […]