Everything we can expect from the new PHP 8 version
The new PHP 8 final version should be released around the end of November 2020, with the Alpha 1 available since the 25th of June – here’s the release schedule.
Being it still under development, there may be several changes and updates on its new features, but here’s a list of what we can expect from the PHP 8.
First of all, the JIT support it’s now available.
According to RFC proposal,
“PHP JIT is implemented as an almost independent part of OPcache. It may be enabled/disabled at PHP compile time and at run-time. When enabled, native code of PHP files is stored in an additional region of the OPcache shared memory and op_array→opcodes.handler(s) keep pointers to the entry points of JIT-ed code. This approach doesn’t require engine modification at all.”
To put it in the simplest way possible, JIT translates parts of the intermediate code into machine code.
To have a complete view of the differences between OPcache and JIT, check this very detailed post from Kinsta’s blog.
PHP 8 will also include some breaking changes, which may require some changes in the code to make it work with this new PHP version.
Moreover, the Union Types V2 RFC will allow to move more type information from phpdoc into function signatures, as explained by Nikita Popov. Also, it will allow every type definition to explicitely tell what possibilities are accepted.
Last but not least, a number of bugs fixes in core PHP code as well as other extentions will also be available.