PHP 8 with jit compiler and attributes is out

Spread the love

PHP 8 has been released. The new version of the language has many changes, including the addition of the jit compiler that makes scripts faster. PHP 8 also has the option to add attributes.

PHP 8 has been available since Thursday. One of the most important additions to the new programming language is jit , or Just In Time. That’s another way of compiling a script to machine code, rather than code running in a virtual machine, which means less overhead. In theory, that could save time if the code is CPU intensive. For websites, where PHP is most commonly used, the profit is likely to be minimal.

Another important addition is that of attributes . This allows metadata to be added to classes and functions. Developers had been asking for this for a long time and always used detours by adding metadata via annotations in comments, for example, but that was not included by default by all parsers. In PHP 8 attributes become part of the syntax by default.

PHP 8 also gets support for union types. That function was also often done by developers in the in-line comments. Union types 2.0 allows users to specify structures within variables.

The new blob of the language can be downloaded and implemented from Thursday afternoon. According to the developers , administrators should not have much trouble during the migration if they have already deployed the previous 7.x versions. Many of the functions disappeared in version 8 have already been phased out. Incidentally, Microsoft previously reported not to support PHP 8 .

You might also like