Adding the last types to PHP code Adding types to PHP code is a staple of any PHP code refactoring. With a code base crawling towards 10 years and over 2000 classes, Exakat is quite a consistent piece of software, with a lot of parameters, methods and properties. Covering everything with types was long, and, […]
PHP native attributes In PHP 8.0, PHP added attributes to its vast arsenal of features. Later, the first native attribute, aka, available in the core of PHP, appeared. Here they are, for quick reference. In PHP 8.2, there are 4 native attributes. Attribute ReturnTypeWillChange SensitiveParameter AllowDynamicProperties Override Attribute Attribute is the attribute to make a […]
Using Exakat with Docker Exakat is available on docker, as community version. It is available at hub.docker.com. Here is how to use it. Installation docker is needed to run this tutorial. To install exakat, start docker, then run the following command in the terminal : git pull exakat/exakat:latest With a graphical interface, such as Docker […]
The 100 PHP functions that you have to know Here is the top 100 PHP functions : it is the list of the most often used PHP native functions. The functions are named, and ranked from 1 to 100. The other 4500 functions are not ranked here. The frequency column represents how often this function […]
Exakat 2.4.6 Review Exakat 2.4.6 finishes the movement to Gremlin 3.6. It now prepares PHP 8.2, with the upcoming feature freeze by the end of July. Preparation for Gremlin 3.6.0 With this version, Exakat has finished the move to Gremlin server 3.6.0. All drivers are now ready, and many rules have been ported to the […]
Bracketless instructions PHP control structures, such as foreach, for, while, if/then/else,… are followed by one or several instructions. When there are several instructions, a block needs to be set up, with curly braces. When the following instruction is unique, it is possible to skip the brackets, and only use the instruction. This feature has always […]
How to make an elePHPant (WIP) Here is the official page about how to make an elephpant (PHP plush toy) generation. This is a Work In Progress, and this article is not yet finished. Come back later for new filled sections. Table of content Why doing an elePHPant generation Preparing for an elePHPant generation […]
Weekly report for the week from 11-07-2022 to 17-07-2022 These are the focus rules for this week : Empty Traits : List of all empty trait defined in the code. Method Collision Traits : Two or more traits are included in the same class, and they have methods collisions. Useless Method Alias : It is […]
5 ways to give a name to your booleans Booleans are either true or false. And sometimes, they mean more than just that : they are options in a method call. There, it is difficult to differentiate them, without a good dose of documentation and self-trust. Readability suffers with booleans as arguments : they have […]
Some Aging Parameters Parameters are part of the signature of methods and functions. They are one of the ways to inject data into a piece of code, for it to be processed. PHP has a lot of options and they have been available since ever. They are easy to find in recent and legacy code. […]