32. Exception catch sans variable
01/11/2020 PHP 8 PAR YOUSSEF BENHSSAIEN 32
Avant
PHP 8
PHP 8
33. JIT (Just In Time)
01/11/2020 PHP 8 PAR YOUSSEF BENHSSAIEN 33
Sans OPCache Avec OPCache Avec JIT
34. JIT (Just In Time)
01/11/2020 PHP 8 PAR YOUSSEF BENHSSAIEN 34
Avec JIT
php.ini :
opcache.jit_buffer_size = 0 // Disabled
opcache.jit_buffer_size = 1024K
opcache.jit = 1235 // CRTO : Cpu Register Trigger Optimization
https://wiki.php.net/rfc/jit
C - CPU specific optimization flags
0 - none
1 - enable AVX instruction generation
R - Register allocation
0 - don't perform register allocation
1 - use local liner-scan register allocator
2 - use global liner-scan register allocator
T - JIT trigger
0 - JIT all functions on first script load
1 - JIT function on first execution
2 - Profile on first request and compile hot functions on second request
3 - Profile on the fly and compile hot functions
4 - Compile functions with @jit tag in doc-comments
O - Optimization level
0 - don't JIT
1 - minimal JIT (call standard VM handlers)
2 - selective VM handler inlining
3 - optimized JIT based on static type inference of individual function
4 - optimized JIT based on static type inference and call tree
5 - optimized JIT based on static type inference and inner procedure analyses
42. Références
https://pociot.dev/32-php-8-try-out-all-new-features : Exemples des nouvelles fonctionnalités
https://3v4l.org/jfUsh : Code démo & Tester en ligne
https://stitcher.io/blog/new-in-php-8 : Présentation des nouvelles fonctionnalités + explications
https://github.com/php/php-src/blob/PHP-8.0/UPGRADING : La liste complète des nouvelles
fonctionnalités
01/11/2020 PHP 8 PAR YOUSSEF BENHSSAIEN 42
43. Merci pour votre attention
https://www.linkedin.com/in/youssefbenhssaien
https://github.com/ybenhssaien
https://medium.com/@youssefbenhssaien
01/11/2020 PHP 8 PAR YOUSSEF BENHSSAIEN 43