All the Dynamic Syntax in PHP With PHP, dynamic calls happens when the call gets at least one of its expression’s elements (and sometimes, even all of them) at execution time. They are not known at coding time, so there are usually some variables involved in the matter. Here is a review of how to […]
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 […]
Remove static variables One discreet update of PHP 8.1 is the upgrade of PHP static variables behavior in classes : Static variables in methods inheritance. Let’s review what are static variables in PHP, why they were problematic so far, and strategies to upgrade the code to remove this problem. PHP static variables While static properties […]
Installing Exakat to monitor several projects Exakat is the smart Static analysis tool for PHP. It reviews the source for PHP compatibility (8.0, 8.1, 8.2 already, Security, and much more. When running it for several projects, it is convenient to use the ‘projects’ style of installation, more than the ‘in-code’ configuration. The ‘projects’ installation is […]
Here are various videos about exakat and the related technologies. Typage automatique en PHP Exakat installation Présentation des cobblers de Exakat [FR] Last video :
Prepare for PHP migration with Exakat Exakat detects compatibility issues in your code, for each minor PHP versions since PHP 5.3. It scans the source for function apparence or disappearance, new syntax and behaviors. init-project-done With a local docker system and access to your code, you can use the following command line to execute Exakat. […]
Getting Older With PHP Exakat runs continuous audits on over 1750 Open source applications, components and frameworks. This is a reality torture test : any error or unexpected results are reviewed and help update the analysis library and the Exakat engine itself. This is a golden mine of tests and real code : an exceptional […]
Common PHP 8.0 Compilation Error Messages With PHP 8.0 closing on us, it is high time to check our code bases to see if they compile, at least. Here is a list of common PHP 8.0 error messages, and what do to with them. The errors have been found on a corpus of 1756 PHP […]
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 […]