Features covered in the video
– Union Types
– Named Arguments
– Attributes
– Constructor Property Promotion
– Match Expression
– WeakMaps
– and couple of others.


https://youtu.be/uU1-ZqIbYes
Your explanation of JIT is wrong. You are only explaining how opcache works. Please look here for a detailed explanation : https://thephp.website/en/issue/php-8-jit/
But aside from that great video ! Keep them coming.
Thanks for your feedback. I made a research before recorded video, but I will do a better research around JIT.
good one, but part about JIT is not about JIT, but about op code caching.
php code firstly compiles to op code, which then runs in virtual machine of PHP – ZendVM
if you turn on op code caching, your php-code compiler will use server virtual memory for creating and keeping cache – parts of php code, already compiled to op code. So when your server will get a request with similar chunks of php code, it will not start the whole analyze, parse and compile processes (which it does in usual cases) but instead use already ready op code from cache
and after this part keep an eye on my hands (lol):
php virtual machine – Zend VM – executes op codes, which results in direct machine code instructions, on this level it goes directly to CPU of your server. So when we turn on JIT, we again use more memory and start to mark php-code chunks to determine so called “hot” and “cold” code portions. If some part of code will be executing very often, it will get “hot” mark and for this chunk will be created some kind of cache – the machine code for this php code. So next time if server will get the same request with the same php-code it can use not even already ready op code from cache – but next level, already ready machine code for your php code.
So we can say as op caching, as jit start to work from the very second request to your server, and yes, it will cost your server come resources, but depending from tasks your server do, you can get drastically improved performance. As practice shows, the best results can be get for the most abstract php requests – like array operations, calculations, data processing, maybe even AI doing, cache and jit for these issues can be quite easily determined, abstracted and converted as cache either jit.
And vice versa – if your server has tones of DB-requests, DB-operations, API and REST shoving-poking, you can get as minor benefits as even worst results – due to overburdening your server with caching/JIT abstract levels, but without suitable php-tasks. We can say it’s like OOP – you don’t need classes for “hello, world!”, it should be used wisely)


===
p.s: whole this picture is just my humble vision of jit, so if I were wrong or unclear and you can explain some part more clearly and in right key – please, do it, I want to clearly understand new stuff about JIT for PHP
Thank you for this!
Members
Online

source