Hantian
Links: http://www.zhihu.com/question/38148900/answer/75115687
Source: Know
PHP7 does not change in principle compared with PHP5, which is different from HHVM. It is mainly based on the Perf Performance analysis tool for general performance optimization.
Reduce memory allocations, use stack memory, cache array hash values, parse strings into macro expansion, use chunks of contiguous memory instead of small chunks of memory, and more. For more details, please see the PHP7 share ppt of brother Bird. Zend Engine program performance improved a lot, PHP program performance is naturally good. All of the optimizations are very real, starting with the details.
Finding a way to optimize a 20-year-old program is a very challenging thing to do, and it is more difficult than refactoring. There are 80% of the world's web sites with PHP, the use of PHP7 after these web site programs are not too expensive to get 1 time times the performance increase free. How much CPU will be saved, how much electricity is saved, and how much carbon emissions are reduced. In addition, PHP is an open source project, with no commercial company behind it, and is entirely community-run. Developers and businesses using the PHP language never paid a penny to PHP's official. So it is recommended that you know your friends mouth to stay, no matter how much you despise PHP, but please respect others for the world to pay.
What are the principles behind PHP7 's superior performance?