权威的PHP 5.6、7.0、7.1、7.2、7.3和7.4 php运行效率基准测试-泓源视野

权威的PHP 5.6、7.0、7.1、7.2、7.3和7.4 php运行效率基准测试

权威的5.6、7.0、7.1、7.2、7.3和7.4 PHP基准(2020)
通过布莱恩·杰克逊(Brian Jackson) • 更新于2020年4月22日

每年,我们都会在各种平台上发布深入的性能基准测试,以了解不同版本的PHP如何相互竞争。这次我们再次全力以赴,对 22种不同平台/配置的6种不同PHP版本进行了 基准测试;包括WordPress,Drupal,Joomla!,Laravel,Symfony等。我们还测试了流行的电子商务解决方案,例如WooCommerce,Easy Digital Downloads,Magento,Grav CMS和October CMS。

免费试用
我们一直鼓励WordPress用户利用最新 支持的PHP版本。它们不仅更安全,而且还提供了其他性能改进。我们也不是只在谈论WordPress,这在所有平台上都是如此。今天我们将向您展示PHP 7.4如何帮助我们克服一切挑战!?

我们在6个不同的PHP版本上测试了22个平台/配置的性能,而#PHP 7.4在17/17(5 N / A)上获得了金牌。??
点击鸣叫
社区和Kinsta中PHP的状况
PHP是一种开放源代码的服务器端脚本和编程语言,主要用于Web开发。大部分核心WordPress软件都是用PHP编写的,这使PHP成为WordPress社区非常重要的语言。有很多优秀的PHP教程,您想学习这种编程语言。

有人可能会争辩说 PHP已经死了。但是,即使开发人员喜欢声明这一点,PHP仍然比以往更活跃,更快,更好。根据W3Techs,使用服务器端编程语言的所有网站中,有78.9%以上使用PHP 。那是很多依赖PHP的网站。

但是,社区中的一个大问题是,许多人仍在使用旧的不受支持的PHP版本。根据 WordPress统计,只有38.3%的人在受支持的PHP版本(7.2或更高版本)上运行。这引入了性能和安全性问题。

为什么会这样呢?以下是我们通常会看到的一些常见原因:

缺乏对社区进行有关PHP是什么及其在WordPress如何发挥作用方面的重要作用的教育。并非每个人都精通技术,这还可以。
在较新版本的PHP上运行的插件和主题的兼容性问题。
WordPress托管提供商不愿推出新版本,因为担心会出现问题。
为了尝试帮助社区向前发展,Kinsta采用了与PHP 相同的寿命终止(EOL)时间表。这有助于确保您的WordPress网站尽可能快和 安全。

Kinsta客户如何与普通的WordPress社区对抗?我们自己很好奇,所以我们看了一些数字。

Kinsta托管的网站的PHP版本
Kinsta托管的网站的PHP版本

这是摘要:

Kinsta的WordPress网站中有25.8%运行的是PHP 7.2。
Kinsta上有68.6%的WordPress网站正在运行PHP 7.3。
Kinsta的4.7%WordPress网站都在运行PHP 7.4。
我们正在努力实现最终的<1%。?
我们为发现这些数字感到骄傲和兴奋。这意味着Kinsta客户中PHP的采用率非常高!比一般的WordPress人口高很多。

在Kinsta托管的所有WordPress网站中,高达73.3%运行的是PHP 7.3或更高版本!?
点击鸣叫
PHP基准测试(2020)
即使不再正式支持PHP 5.6、7.0和7.1,仍然有很多WordPress网站在运行。因此,我们决定测试所有六个不同的PHP版本,以便您可以看到较新的版本在性能方面能给您带来多少好处。

对于每个测试,我们使用每个平台的最新版本,并以15个并发用户为基准对主页进行一分钟的基准测试。以下是我们测试环境的详细信息。

使用的计算机: Intel®Xeon®CPU(30 CPU,120 GB RAM,1TB SSD)。这是由Google Cloud Platform提供支持并在隔离的容器中运行的“计算优化”(C2)计算机。所有Kinsta托管计划都提供C2机器。
操作系统: Ubuntu 18.04.3 LTS(GNU / Linux 5.0.0-1026-gcp x86_64)
堆栈: Nginx 1.17.6,MariaDB 10.4.10
PHP版本: 5.6、7.0、7.1、7.2、7.3、7.4。
注意: 在某些CMS / Frameworks中,我们还安装了其他PHP软件包,以满足其新要求或与Composer依赖关系。
页面缓存: 在所有配置和平台上均禁用。
OPcache:对于WordPress,Joomla和Drupal,我们使用了官方的Docker映像。其余的我们使用相同的映像设置,并使用以下推荐的php.ini设置启用了OPcache ,但该 opcache.max_accelerated_files 值从4,000增加到50,000。
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=50000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=1
OPcache通过将预编译的脚本字节码存储在共享内存中来提高PHP性能,从而消除了PHP在每个请求上加载和解析脚本的需求。

这些测试是由Kinsta的WordPress贡献者和Web开发人员Thoriq Firdaus执行的。

经过测试的平台和配置
我们的测试包括以下22种平台/配置。在某些情况下,由于缺乏对特定PHP版本的支持,我们不得不测试多个版本。单击下面的一个可直接跳至其测试说明和结果。数据以每秒请求数衡量。请求越多越好。

WordPress 5.3
WordPress 5.3 + WooCommerce 3.8.1
WordPress 5.3 +简易数字下载2.9.20
Drupal 8.8.0
Joomla!3.9.13
Magento 2(CE)2.2.10 + 2.3.3
Grav CMS 1.6.19
十月CMS 1.0.458
Laravel 5.8.35 + 6.7.0
Symfony 4.4.2 + 5.0.1
CodeIgniter 3.1.11 + 4.0-rc.3
CakePHP 3.8.7 + 4.0.0
PyroCMS 3.7
Pagekit 1.0.17
螺栓CMS 3.7.0
Craft CMS 3.4.0-beta.4
ExpressionEngine 5.3.0
由于每个平台上的演示内容可能会发生很大的变化,因此我们决定测试全新的准系统的原始性能。

WordPress 5.3
当然,我们测试的第一个平台是我们最喜欢的平台之一:WordPress(我们每天都会生活和呼吸CMS,这可能会有点偏bias)。WordPress的核心是开源软件,您可以使用它来创建漂亮的网站,博客或应用程序。实际上,WordPress 在互联网上占所有网站的35.2%。是的-您访问的网站中有三分之一以上可能由WordPress提供支持。

WordPress CMS

我们从WordPress 5.3开始,它是撰写本文时的最新版本。我们使用了新的Twenty Twenty主题,并与15个并发用户对网站进行了1分钟的基准测试。

经过测试的网址: /hello-world/
注意:该页面包含1条注释,一个带有几个菜单的导航栏。侧边栏包含一些默认的WordPress小部件。
Docker镜像源自https://hub.docker.com/_/wordpress/。
WordPress 5.3 PHP基准测试
WordPress 5.3 PHP基准测试

嵌入您的网站:
权威的PHP 5.6、7.0、7.1、7.2、7.3和7.4 php运行效率基准测试插图
Img src: Kinsta

基准结果
WordPress 5.3 PHP 5.6基准测试:97.71 req / sec
WordPress 5.3 PHP 7.0基准测试结果:256.81 req / sec
WordPress 5.3 PHP 7.1基准测试结果:256.99 req / sec
WordPress 5.3 PHP 7.2基准测试结果:273.07 req / sec
WordPress 5.3 PHP 7.3基准测试结果:305.59 req / sec
WordPress 5.3 PHP 7.4基准测试结果:313.42 req / sec?
PHP 7.4是赢家,被证明比PHP 7.3快一点。而且,如果将PHP 7.4与PHP 5.6进行比较,则它每秒可以处理3倍以上的请求(事务)!

Update your PHP with one-click for greater site performance, speed, and security. Try Kinsta for Free.

WordPress 5.3 + WooCommerce 3.5.2
WooCommerce is a fully customizable, open-source ecommerce platform built for WordPress. It’s also by far, one of the most popular ecommerce solutions in the WordPress community, and currently powers over 14% of all ecommerce sites on the internet.

WooCommerce

For this next test, we took WordPress along with WooCommerce installed. We utilized the free Storefront eCommerce theme (2.5.3).

Tested URL: /product/woo-ninja/
Note: The page contains 3 related products, 1 product review/comment, 1 product in “You May Also Like” section, and product in next and previous pagination.
Docker Image is derived from https://hub.docker.com/_/wordpress/.
WordPress 5.3 + WooCommerce PHP基准测试
WordPress 5.3 + WooCommerce PHP Benchmarks

Embed on your site:
权威的PHP 5.6、7.0、7.1、7.2、7.3和7.4 php运行效率基准测试插图1
Img src: Kinsta

Benchmark Results
WordPress 5.3 + WooCommerce 3.8.1 PHP 5.6 benchmark results: 49.29 req/sec
WordPress 5.3 + WooCommerce 3.8.1 PHP 7.0 benchmark results: 117.35 req/sec
WordPress 5.3 + WooCommerce 3.8.1 PHP 7.1 benchmark results: 117.52 req/sec
WordPress 5.3 + WooCommerce 3.8.1 PHP 7.2 benchmark results: 125.85 req/sec
WordPress 5.3 + WooCommerce 3.8.1 PHP 7.3 benchmark results: 141.68 req/sec
WordPress 5.3 + WooCommerce 3.8.1 PHP 7.4 benchmark results: 146.07 req/sec ?
When running WooCommerce, PHP 7.4 beat out PHP 7.3 by a small margin.

WordPress 5.3 + Easy Digital Downloads 2.9.20
由Pippin Williamson创建的Easy Digital Downloads(EDD)是一个免费的WordPress电子商务插件,主要致力于帮助创作者和开发者销售数字产品。

轻松数字下载

在了解了WooCommerce的表现之后,我们随后将WordPress和Easy Digital Downloads一起安装了。我们利用了免费的主题主题(1.0.7)。

经过测试的网址: /downloads/side-hustle/
注意:该页面是EDD的单一产品,包含图像,几段段落行,购买按钮和类别链接。
Docker镜像源自https://hub.docker.com/_/wordpress/。
WordPress 5.3 + Easy Digital下载PHP基准
WordPress 5.3 + Easy Digital下载PHP基准

嵌入您的网站:
权威的PHP 5.6、7.0、7.1、7.2、7.3和7.4 php运行效率基准测试插图2
Img src: Kinsta

基准结果
WordPress 5.3 + EDD 2.9.20 PHP 5.6基准测试结果:136.73 req / sec
WordPress 5.3 + EDD 2.9.20 PHP 7.0基准测试结果:323.84 req / sec
WordPress 5.3 + EDD 2.9.20 PHP 7.1 benchmark results: 326.32 req/sec
WordPress 5.3 + EDD 2.9.20 PHP 7.2 benchmark results: 346.51 req/sec
WordPress 5.3 + EDD 2.9.20 PHP 7.3 benchmark results: 390.85 req/sec
WordPress 5.3 + EDD 2.9.20 PHP 7.4 benchmark results: 400.78 req/sec ?
PHP 7.4 was also the fastest with WordPress and Easy Digital Downloads.

When it comes to WordPress, WooCommerce, and Easy Digital Downloads, PHP 7.4 has proven to be marginally faster across the board!

Info
All benchmark data is measured in requests per second. The more requests the better.

Drupal 8.8.0
Drupal is an open-source CMS popular for its modular system and strong developer community. It was originally launched in 2000 and according to W3Techs, powers 1.7% of all websites with a 3.0% share of the content management system market.

Drupal

For the Drupal benchmark, we utilized the free Umami default theme (8.8.0).

Tested URL: /en/articles/dairy-free-and-delicious-milk-chocolate
Note: Drupal is installed with dummy data “Umami Food Magazine (Experimental)” that comes built-in.
Drupal 8.8 no longer supports PHP 5.6 and isn’t compatible with PHP 7.4 yet (https://www.drupal.org/project/drupal/issues/3086374).
Docker Image is derived from https://hub.docker.com/_/drupal/.
Drupal PHP基准测试
Drupal PHP benchmarks

Embed on your site:

Img src: Kinsta

Benchmark Results
Drupal 8.8.0 PHP 5.6 benchmark results: not supported
Drupal 8.8.0 PHP 7.0 benchmark results: 18.47 req/sec
Drupal 8.8.0 PHP 7.1 benchmark results: 18.81 req/sec
Drupal 8.8.0 PHP 7.2 benchmark results: 19.38 req/sec
Drupal 8.8.0 PHP 7.3 benchmark results: 21.56 req/sec ?
Drupal 8.8.0 PHP 7.4 benchmark results: not supported
When running Drupal, PHP 7.3 showed great improvement in performance. It was a much bigger leap than the previous PHP versions.

We grew our traffic 1,187% with WordPress.
We’ll show you how.
Join 20,000+ others who get our weekly newsletter with insider WordPress tips!
SUBSCRIBE NOW
Subscribe to the Kinsta newsletter
输入你的电子邮箱
Subscribe

I agree to the Terms and Conditions and Privacy Policy
Joomla! 3.9.13
Joomla! is a free and open-source CMS for publishing web content, originally released on August 17, 2005. It’s built on a model–view–controller web application framework and according to W3Techs is used by 2.6% of all websites on the internet.

Joomla!

For the Joomla! benchmark, we utilized the free Protostar (1.0) template which is included in the Joomla! 3.x distribution package.

Tested URL: / (homepage)
Note: Joomla! is installed with “default English (GB) sample data.” It provides basic dummy content on the homepage. The homepage contains a few paragraphs of content, a search input form, and a number of basic widgets on the sidebar.
Docker Image is derived from https://hub.docker.com/_/joomla/.
Joomla! PHP基准
Joomla! PHP benchmarks

Embed on your site:

Img src: Kinsta

Benchmark Results
Joomla!3.9.13 PHP 5.6基准测试结果:48.40 req / sec
Joomla!3.9.13 PHP 7.0基准测试结果:67.80 req / sec
Joomla!3.9.13 PHP 7.1基准测试结果:67.37 req / sec
Joomla!3.9.13 PHP 7.2基准测试结果:68.53 req / sec
Joomla!3.9.13 PHP 7.3基准测试结果:71.63 req / sec
Joomla!3.9.13 PHP 7.4基准测试结果:76.31 req / sec?
在Joomla上!我们可以看到整体表现有些差。从PHP 5.6到7.0+的性能有了巨大的提高。并快速前进到PHP 7.4,无疑是Joomla的赢家!

Magento 2(CE)2.2.10 + 2.3.3
Magento是使用PHP编写的流行的开源电子商务平台,于2008年3月31日发布。截至2018年,Magento现在是Adobe公司。据W3Techs称,它为互联网上所有网站的0.8%提供支持。

Magento

对于Magento 2基准,我们使用了免费的Luma主题。由于2.2.10仅支持PHP 7.2,所以我们使用了两个版本。对于其他测试,我们使用2.3.3。

经过测试的网址: /lifelong-fitness-iv.html
注意:禁用了生成静态HTML页面的页面缓存。经测试的URL是单个产品。它包含一个图像产品,一个导航栏,面包屑导航,并且没有评论。
Magento 2不再支持PHP 5.6并且与PHP 7.4不兼容。
http://pubfiles.nexcess.net/magento/ce-packages/
Magento 2 PHP基准测试
Magento 2 PHP基准测试

嵌入您的网站:
权威的PHP 5.6、7.0、7.1、7.2、7.3和7.4 php运行效率基准测试插图3
Img src: Kinsta

基准结果
Magento 2(CE)2.2.10 PHP 5.7基准测试结果:不支持
Magento 2(CE)2.2.10 PHP 7.0基准测试结果:28.33 req / sec
Magento 2(CE)2.2.10 PHP 7.1基准测试结果:28.51 req / sec
Magento 2 (CE) 2.2.10 PHP 7.2 benchmark results: 29.58 req/sec
Magento 2 (CE) 2.2.10 PHP 7.3 benchmark results: not supported
Magento 2 (CE) 2.2.10 PHP 7.4 benchmark results: not supported
Magento 2 (CE) 2.3.0 PHP 5.6 benchmark results: not supported
Magento 2 (CE) 2.3.0 PHP 7.0 benchmark results: not supported
Magento 2 (CE) 2.3.0 PHP 7.1 benchmark results: 25.33 req/sec
Magento 2 (CE) 2.3.0 PHP 7.2 benchmark results: 27.01 req/sec
Magento 2 (CE) 2.3.0 PHP 7.3 benchmark results: 29.97 req/sec ?
Magento 2 (CE) 2.3.0 PHP 7.4 benchmark results: not supported
Magento 2 PHP benchmarks don’t vary too much. But great news is that the latest version of Magento along with the latest supported PHP version (7.3) is the fastest.

Grav CMS 1.6.19
Grav是易于使用但功能强大的开源CMS,不需要数据库。有时也称为平面文件CMS。

Grav CMS

对于Grav CMS基准,我们使用了免费的Clean Blog框架包。

经过测试的网址: /home/the-urban-jungle
Grav CMS不再支持PHP 5.6和7.0。
注意:内容是一个简单的单栏博客文章,没有侧边栏。Core GravCMS缓存已禁用。
Grav CMS PHP基准
Grav CMS PHP基准

嵌入您的网站:

Img src: Kinsta

基准结果
Grav CMS 1.6.19 PHP 5.6基准测试结果:不支持
Grav CMS 1.6.19 PHP 7.0基准测试结果:不支持
Grav CMS 1.6.19 PHP 7.1基准测试结果:62.25 req / sec
Grav CMS 1.6.19 PHP 7.2基准测试结果:64.69 req / sec
Grav CMS 1.6.19 PHP 7.3基准测试结果:69.07 req / sec
Grav CMS 1.6.19 PHP 7.4 benchmark results: 75.04 req/sec ?
We can see with Grav CMS that the latest version of PHP 7.4 is the winner.

It’s also nice to see these smaller content management systems dropping support for older versions of PHP. Although that is one advantage of not being quite as big either. Unfortunately, when it comes to WordPress and other platforms with a large portion of the market share, things progress more slowly due to compatibility issues.

October CMS 1.0.458
October CMS is a free, open-source, self-hosted and modular CMS platform based on the Laravel PHP Framework. It was originally released on May 15, 2014.

十月CMS

For the October CMS benchmark, we utilized the free Clean Blog theme.

Tested URL: /blog/post/first-blog-post
October CMS no longer supports PHP 5.6 and isn’t compatible with PHP 7.4 yet (https://github.com/octobercms/october/issues/4381).
十月CMS PHP基准测试
October CMS PHP benchmarks

Embed on your site:

Img src: Kinsta

Benchmark Results
October CMS 1.0.458 PHP 5.6 benchmark results: not supported
October CMS 1.0.458 PHP 7.0 benchmark results: 44.83 req/sec
October CMS 1.0.458 PHP 7.1 benchmark results: 45.21 req/sec
October CMS 1.0.458 PHP 7.2 benchmark results: 46.71 req/sec
October CMS 1.0.458 PHP 7.3 benchmark results: 49.26 req/sec ?
October CMS 1.0.458 PHP 7.4 benchmark results: not supported
PHP 7.3 is the winner, if only by a slight margin. PHP 7.4 once it’s supported will most likely show improvements as well.

Laravel 5.8.35 + 6.7.0
Laravel是一个非常流行的开源PHP框架,用于开发Web应用程序。它由泰勒·奥特威尔(Taylor Otwell)创建,并于2011年6月发布。

Laravel徽标

对于Laravel基准测试,我们使用了普通的HTML主题。

经过测试的网址:(/首页)
该帖子包含标题,作者姓名和主要内容。该数据库包含1个表“ posts”。该表包含6列“ post_title”,“ post_content”,“ post_author”,“ created_at”和“ updated_at”。
经测试的URL连接到数据库,并在表上显示所有帖子。此外,Laravel应用程序包含1条路线和1个控制器来显示这些内容。
Laravel 5.8.35不再支持PHP 5.6或PHP 7.0。Laravel 6.7.0不再支持PHP 5.6、7.0或7.1。
Laravel PHP基准测试
Laravel PHP基准测试

嵌入您的网站:

Img src: Kinsta

基准结果
Laravel 5.8.35 PHP 5.6基准测试结果:不支持
Laravel 5.8.35 PHP 7.0基准测试结果:不支持
Laravel 5.8.35 PHP 7.1基准测试结果:380.52 req / sec
Laravel 5.8.35 PHP 7.2基准测试结果:382.80 req / sec
Laravel 5.8.35 PHP 7.3基准测试结果:400.22 req / sec
Laravel 5.8.35 PHP 7.4基准测试结果:402.39 req / sec?
Laravel 6.7.0 PHP 5.6基准测试结果:不支持
Laravel 6.7.0 PHP 7.0基准测试结果:不支持
Laravel 6.7.0 PHP 7.1基准测试结果:不支持
Laravel 6.7.0 PHP 7.2基准测试结果:383.21 req / sec
Laravel 6.7.0 PHP 7.3基准测试结果:392.74 req / sec
Laravel 6.7.0 PHP 7.4基准测试结果:394.96 req / sec
在这两个版本上,PHP 7.4都是明显的赢家。但是,有趣的是,带有PHP 7.4的Laravel 5.8.35似乎比Laravel 6.7.0快。

Symfony 4.4.2 + 5.0.1
Symfony是一组可重用的PHP组件和一个PHP框架,用于构建Web应用程序,API,微服务和Web服务。它于2005年10月22日发布。

Symfony

对于Symfony基准,我们将Symfony演示与MySQL(默认为SQLite)一起使用。

经过测试的网址: /en/blog/posts/hello-world
帖子包含标题,日期,作者姓名,2个标签和5条评论。
Symfony 4.4.2不再支持PHP 5.6或PHP 7.0。Symfony 5.0.1不再支持PHP 5.6、7.0或7.1。
Symfony PHP基准
Symfony PHP基准

嵌入您的网站:

Img src: Kinsta

基准结果
Symfony 4.4.2 PHP 5.6基准测试结果:不支持
Symfony 4.4.2 PHP 7.0基准测试结果:不支持
Symfony 4.4.2 PHP 7.1基准测试结果:295.84 req / sec
Symfony 4.4.2 PHP 7.2基准测试结果:309.26 req / sec
Symfony 4.4.2 PHP 7.3基准测试结果:327.61 req / sec
Symfony 4.4.2 PHP 7.4基准测试结果:338.18 req / sec?
Symfony 5.0.1 PHP 5.6基准测试结果:不支持
Symfony 5.0.1 PHP 7.0基准测试结果:不支持
Symfony 5.0.1 PHP 7.1基准测试结果:不支持
Symfony 5.0.1 PHP 7.2基准测试结果:229.09 req / sec
Symfony 5.0.1 PHP 7.3基准测试结果:239.96 req / sec
Symfony 5.0.1 PHP 7.4基准测试结果:252.22 req / sec
我们可以看到Symfony版本4.4.2和PHP 7.4是最快的。

一键式更新PHP,以提高站点性能,速度和安全性。免费试用Kinsta。

CodeIgniter 3.1.11 + 4.0-rc.3
CodeIgniter是一个功能强大的PHP框架,占地面积很小,是为需要简单优雅的工具箱来创建功能齐全的Web应用程序的开发人员而构建的。

CodeIgniter徽标

经过测试的网址:(/首页)
注意:帖子包含标题,作者姓名和主要内容。该数据库包含1个表“ posts”。该表包含6列“ post_title”,“ post_content”,“ post_author”,“ created_at”和“ updated_at”。
经测试的URL连接到数据库,并在表上显示所有帖子。此外,CodeIgniter应用程序包含1条路由和1个控制器来显示这些内容。
CodeIgniter 4.0-rc.3不支持PHP 5.6、7.0或7.1。
CodeIgniter PHP基准测试
CodeIgniter PHP基准测试

嵌入您的网站:

Img src: Kinsta

基准结果
CodeIgniter 3.1.11 PHP 5.6基准测试结果:292.81 req / sec
CodeIgniter 3.1.11 PHP 7.0基准测试结果:358.40 req / sec
CodeIgniter 3.1.11 PHP 7.1基准测试结果:369.93 req / sec
CodeIgniter 3.1.11 PHP 7.2基准测试结果:383.24 req / sec
CodeIgniter 3.1.11 PHP 7.3基准测试结果:392.28 req / sec
CodeIgniter 3.1.11 PHP 7.4 benchmark results: 394.96 req/sec ?
CodeIgniter 4.0-rc.3 PHP 5.6 benchmark results: not supported
CodeIgniter 4.0-rc.3 PHP 7.0 benchmark results: not supported
CodeIgniter 4.0-rc.3 PHP 7.1 benchmark results: not supported
CodeIgniter 4.0-rc.3 PHP 7.2 benchmark results: 319.68 req/sec
CodeIgniter 4.0-rc.3 PHP 7.3 benchmark results: 322.90 req/sec
CodeIgniter 4.0-rc.3 PHP 7.4 benchmark results: 333.08 req/sec
As with Laravel and Symfony, PHP 7.4 was the fastest when running CodeIgniter. What was interesting is that CodeIgniter 3.1.11 was significantly faster than 4.0-rc.3. However, bear in mind that it is a release candidate.

CakePHP 3.8.7 + 4.0.0
CakePHP is an open-source web, rapid development framework that makes building web applications simpler, faster and require less code. It was released in April 2005.

CakePHP徽标

经过测试的网址:(/首页)
注意:帖子包含标题,作者姓名和主要内容。该数据库包含1个表“ posts”。该表包含6列“ post_title”,“ post_content”,“ post_author”,“ created_at”和“ updated_at”。
经测试的URL连接到数据库,并在表上显示所有帖子。此外,CodeIgniter应用程序包含1条路由和1个控制器来显示这些内容。
CakePHP 4.0.0不支持PHP 5.6、7.0或7.1。
CakePHP基准
CakePHP基准

嵌入您的网站:

Img src: Kinsta

基准结果
CakePHP 3.8.7 PHP 5.6基准测试结果:134.09 req / sec
CakePHP 3.8.7 PHP 7.0基准测试结果:254.58 req / sec
CakePHP 3.8.7 PHP 7.1基准测试结果:267.29 req / sec
CakePHP 3.8.7 PHP 7.2基准测试结果:270.94 req / sec
CakePHP 3.8.7 PHP 7.3基准测试结果:290.25 req / sec
CakePHP 3.8.7 PHP 7.4基准测试结果:294.06 req / sec?
CakePHP 4.0.0 PHP 5.6基准测试结果:不支持
CakePHP 4.0.0 PHP 7.0基准测试结果:不支持
CakePHP 4.0.0 PHP 7.1基准测试结果:不支持
CakePHP 4.0.0 PHP 7.2基准测试结果:245.49 req / sec
CakePHP 4.0.0 PHP 7.3基准测试结果:260.84 req / sec
CakePHP 4.0.0 PHP 7.4基准测试结果:259.58 req / sec
对于CakePHP,运行PHP 7.4的版本3.8.7成为赢家。

PyroCMS 3.7
PyroCMS是一个开放源代码,从本质上讲是Laravel的扩展,它使您可以更快地在框架上构建网站和应用程序。

高温CMS

对于PyroCMS基准测试,我们使用了免费的入门主题。

经过测试的网址: /posts/welcome-to-pyrocms
PyroCMS 3.7不支持PHP 5.6或7.0。
Note: We encountered an error when running on PHP 7.4. Most likely because it isn’t supported yet. Therefore, we weren’t able to include it in the benchmarks.
PyroCMS PHP基准
PyroCMS PHP benchmarks

Embed on your site:

Img src: Kinsta

Benchmark Results
PyroCMS 3.5.3 PHP 5.6 benchmark results: not supported
PyroCMS 3.5.3 PHP 7.0 benchmark results: not supported
PyroCMS 3.5.3 PHP 7.1 benchmark results: 91.45 req/sec
PyroCMS 3.5.3 PHP 7.2 benchmark results: 94.77 req/sec
PyroCMS 3.5.3 PHP 7.3 benchmark results: 103.35 req/sec ?
PyroCMS 3.5.3 PHP 7.4 benchmark results: not supported
Due to the fact that PHP 7.4 isn’t working yet with PyroCMS, PHP 7.3 won the tests here by a small margin.

Pagekit 1.0.17
Pagekit is an open-source modular and lightweight CMS founded by YOOtheme. It gives you the tools to create beautiful websites. It was released in the Spring of 2016.

页面套件

For the Pagekit benchmark, we used the free One theme (default Pagekit theme).

Tested URL: /blog/1
Pagekit PHP基准测试
Pagekit PHP benchmarks

Embed on your site:

Img src: Kinsta

Benchmark Results
Pagekit 1.0.17 PHP 5.6 benchmark results: 249.48 req/sec
Pagekit 1.0.17 PHP 7.0 benchmark results: 401.77 req/sec
Pagekit 1.0.17 PHP 7.1 benchmark results: 406.99 req/sec
Pagekit 1.0.17 PHP 7.2 benchmark results: 419.56 req/sec
Pagekit 1.0.17 PHP 7.3 benchmark results: 431.21 req/sec
Pagekit 1.0.17 PHP 7.4 benchmark results: 438.39 req/sec ?
PHP 7.4 took the gold when testing it with Pagekit.

Bolt CMS 3.7.0
Bolt CMS,即Bolt,是一种开源内容管理工具,力求尽可能简单明了。它基于Silex和Symfony组件,使用Twig和SQLite,MySQL或PostgreSQL。

螺栓CMS

对于Bolt CMS基准测试,我们使用了免费的Bolt Base 2018主题。

经过测试的网址: /entry/hello-world
注意:使用内置虚拟内容生成器生成的内容。
Bolt CMS PHP基准测试
Bolt CMS PHP基准测试

嵌入您的网站:

Img src: Kinsta

基准结果
Bolt CMS 3.7.0 PHP 5.6基准测试结果:50.91 req / sec
Bolt CMS 3.7.0 PHP 7.0基准测试结果:132.49 req / sec
Bolt CMS 3.7.0 PHP 7.1基准测试结果:134.55 req / sec
Bolt CMS 3.7.0 PHP 7.2基准测试结果:139.02 req / sec
Bolt CMS 3.7.0 PHP 7.3基准测试结果:147.03 req / sec
Bolt CMS 3.7.0 PHP 7.4基准测试结果:162.77 req / sec?
当使用Bolt CMS进行测试时,PHP 7.4赢得了金牌。看到自PHP 5.6以来的性能改进也令人惊奇。

Craft CMS 3.4.0-beta.4
Craft CMS是面向开发人员,设计人员和Web专业人士的重点内容管理系统,融合了灵活性,强大功能和客户易用性。

工艺CMS

经过测试的网址: /news/barrel-aged-digital-natives
Craft CMS不支持PHP 5.6。
使用https://github.com/craftcms/demo测试了演示应用
Craft CMS PHP基准
Craft CMS PHP基准

嵌入您的网站:

Img src: Kinsta

基准结果
Craft CMS 3.4.0-beta.4 PHP 5.6基准测试结果:不支持
Craft CMS 3.4.0-beta.4 PHP 7.0基准测试结果:140.81 req / sec
Craft CMS 3.4.0-beta.4 PHP 7.1基准测试结果:145.75 req / sec
Craft CMS 3.4.0-beta.4 PHP 7.2基准测试结果:151.15 req / sec
Craft CMS 3.4.0-beta.4 PHP 7.3基准测试结果:163.95 req / sec
Craft CMS 3.4.0-beta.4 PHP 7.4基准测试结果:169.11 req / sec?
PHP 7.4在使用Craft CMS进行测试时获得了金牌。

ExpressionEngine 5.3.0
ExpressionEngine是一个灵活的,功能丰富的内容管理平台,它使世界各地成千上万的个人和组织可以轻松地管理其网站。

表达引擎

对于ExpressionEngine基准,我们使用了默认主题。

经过测试的网址: /blog/entry/super-old-entry
ExpressionEngine不支持PHP 5.6。
注意:页面包含带有3个小部件(搜索,类别列表和RSS feed链接)的侧栏。页面还包含面包屑导航。
ExpressionEngine PHP基准
ExpressionEngine PHP基准

嵌入您的网站:

Img src: Kinsta

基准结果
ExpressionEngine 5.3.0 PHP 5.6基准测试结果:不支持
ExpressionEngine 5.3.0 PHP 7.0基准测试结果:101.32 req / sec
ExpressionEngine 5.3.0 PHP 7.1基准测试结果:103.54 req / sec
ExpressionEngine 5.3.0 PHP 7.2基准测试结果:107.79 req / sec
ExpressionEngine 5.3.0 PHP 7.3基准测试结果:108.35 req / sec
ExpressionEngine 5.3.0 PHP 7.4基准测试结果:110.56 req / sec?
用ExpressionEngine进行测试时,PHP 7.4赢得了金牌。

在Kinsta更新到PHP 7.4
如果以上结果不能使您信服,我们不确定会怎样!只是一个善意的提醒。如果你是一个Kinsta客户端,PHP 7.2,7.3和7.4都可以供你使用。如果您希望看到性能改进,则可以在MyKinsta仪表板中单击一下即可轻松更改为较新的版本。

更改为PHP 7.4
更改为PHP 7.4

如果您担心它与第三方插件不兼容(可能会发生),这正是我们拥有暂存站点的原因。?您可以进行测试,而不必担心破坏生产现场。

从基准结果中总结
从上面的测试中您可以清楚地看到,就所有平台的性能而言,PHP 7.4处于领先地位。

我们在6个不同的PHP版本上测试了22个平台/配置的性能,而#PHP 7.4在17/17(5 N / A)上大获全胜!?
点击鸣叫
在上面测试的22种配置中,PHP 7.4是17种中最快的引擎。并非不是赢家的原因仅仅是因为Drupal,Magento 2,十月CMS,PyroCMS尚未完全支持PHP 7.4或存在兼容性问题。
就WordPress而言,PHP 7.4是所有测试中最快的(WordPress站点有5.3,WooCommerce和Easy Digital Downloads)。
在许多基准测试结果中,您可以轻松地发现发布的每个新版本的PHP都可以提高性能。这就是为什么测试您的网站,插件等并坚持定期的升级计划如此重要的原因。您的访客和客户会感谢您,因为他们期望速度!
我们甚至没有测试过preloading,这是PHP 7.4中引入的新功能。这意味着7.4甚至可能会更快。
如果您的托管服务提供商不提供PHP的较新版本,那么也许您该考虑迁移了。
对于WordPress用户,除了升级到最新的PHP版本外,我们还收集了许多其他技术,可以帮助您进一步提高网站性能。请参阅我们的最终指南中有关如何加快WordPress网站速度的详细信息。
我们对PHP 7.4感到非常兴奋,希望您也是如此!我们很想听听您对基准测试的想法,甚至是您升级后的经验。将它们放在评论中。

如果您喜欢这篇文章,那么您会喜欢Kinsta的WordPress托管平台。加速您的网站,并从我们经验丰富的WordPress团队获得24/7支持。我们基于Google Cloud的基础架构专注于自动扩展,性能和安全性。让我们向您展示Kinsta的与众不同!查看我们的计划

泓源视野转载
————————————————
版权声明:本文为CSDN博主「lvwuwei」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/lvwuwei/article/details/105927019

本文由 泓源视野 作者:admin 发表,其版权均为 泓源视野 所有,文章内容系作者个人观点,不代表 泓源视野 对观点赞同或支持。如需转载,请注明文章来源。
13

发表评论

Protected with IP Blacklist CloudIP Blacklist Cloud
您是第8237725 位访客, 您的IP是:[44.222.220.101]