Semantic typing

Semantic typing Semantic typing is an old practice, where the name of the parameter would also tell what its type is. It is typing, because a $string is supposed to be typed, and it is semantic, because only the human reader is actually using the meaning : PHP doesn’t really care. The interesting part is […]

Unpacked, named and array of positional arguments are in a call…

mixed sorts of pumpkins

Unpacked, named and positional arguments are in a call… How to handle an array of positional arguments in PHP? Argument spread is the three dots operator, when used with arguments. Its primary usage is simple : it stands in front of a variable, and turns an array into a list of arguments. Recently, while checking […]

The three nothings of PHP

The three nothings of PHP Mathematicians have the concept of infinity, which represents something that cannot be topped. Strangely enough, infinities come in different sizes : some infinities are larger than others. That sounds quite paradoxical, yet somewhat understandable. And yet, there are no less than three nothings in PHP. On the other hand, PHPians, […]

Let’s make PHP more abstract

abstract

Let’s make PHP more abstract abstract is a conception keyword. It is decided during the conception phase that some classes and some methods uses the abstract keyword. Later, that keyword might disappear as needed, yet abstract never appears sponteanously. Nobody decides abstraction late in the coding phase. That seems to be a lack of practise […]

PHP Native Attributes quick reference

PHP native attributes In PHP 8.0, PHP added native 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.3, there are 5 native attributes. PHP 8.0 Attribute PHP 8.1 ReturnTypeWillChange SensitiveParameter PHP 8.2 AllowDynamicProperties PHP 8.3 […]

Using Exakat with Docker

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 : docker pull exakat/exakat:latest With a graphical interface, such as Docker […]