![]() ![]() The results show that the performance improvement of PHP 8.2 is quite significant (15%) compared with PHP 7.4.33.Īnother important results is the performance trend, the PHP team did a great job improving the execution time on each release, this is not a simple task considering also the amount of new features added to the language. ![]() If we compare the execution time of PHP 8.2.0 with other versions (without JIT), we discover that is: Typically, a web application is not CPU-intensive and the usage of JIT can potentially degrade performance, giving the opposite effect. That said, we know the JIT can be useful only for CPU-intensive applications. If you enable the JIT compiler (available only from 8.0.0) the execution time is reduced by 80%. I represented the execution time on a chart for each PHP versions (lower is better):Īs you can see, PHP 8.2.0 is the fastest with 0.200 sec and PHP 7.4.33 is the slowest with 0.232 sec. Here the results (in seconds) for each PHP versions: PHP 8.2.0 Once the package list has finished updating, run the following command to install the lsb-release package. For our first step we need to update the package list by using the command below. If you are not familiar with the JIT feature of PHP 8, I suggest to read this excellent article. This package allows us to quickly get the details we need when setting up the PHP repository. Php -dopcache.enable_cli=1 -dopcache.jit_buffer_size=256M path/to/Zend/bench.php I executed the experiment using an 11th Gen Intel(R) Core(TM) i9-11950H CPU 2.60GHz, with 32GB RAM, HD SSD running Linux Ubuntu 22.04.1 LTS.įor the PHP 8 versions, I also executed the Zend/bench.php script using the Just In Time compiler (JIT). I used the latest PHP versions available, as follows: This script is included with the PHP source code and it was created for testing the language using some math operators, nested loops, array, strings and recursive functions. I used the Zend/bench.php script to run the experiment, getting the total execution times. I was curios to benchmark the execution time of this release compared with the previous ones until PHP 7.4.33, that recently became unsupported on. ![]() This version contains many new features like readonly classes, Disjunctive Normal Form (DNF) types, new "Random" extension, constants in traits, etc. ![]() Past PHP releases.The PHP team has released PHP 8.2.0 on. We have collected all the official information and code available for Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Supported Protocols and Wrappers Security Introduction General considerations Installed as CGI binary Installed as an Apache module Session Security Filesystem Security Database Security Error Reporting User Submitted Data Hiding PHP Keeping Current Features HTTP authentication with PHP Cookies Sessions Dealing with XForms Handling file uploads Using remote files Connection handling Persistent Database Connections Command line usage Garbage Collection DTrace Dynamic Tracing Function Reference Affecting PHP's Behaviour Audio Formats Manipulation Authentication Services Command Line Specific Extensions Compression and Archive Extensions Cryptography Extensions Database Extensions Date and Time Related Extensions File System Related Extensions Human Language and Character Encoding Support Image Processing and Generation Mail Related Extensions Mathematical Extensions Non-Text MIME Output Process Control Extensions Other Basic Extensions Other Services Search Engine Extensions Server Specific Extensions Session Extensions Text Processing Variable and Type Related Extensions Web Services Windows Only Extensions XML Manipulation GUI Extensions Keyboard Shortcuts ? This help j Next menu item k Previous menu item g p Previous man page g n Next man page G Scroll to bottom g g Scroll to top g h Goto homepage g s Goto search ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |