Home  >  Article  >  php教程  >  迁移PHP版本到PHP7

迁移PHP版本到PHP7

WBOY
WBOYOriginal
2016-06-13 09:15:21874browse

迁移PHP版本到PHP7

  这篇文章主要介绍了迁移PHP版本到PHP7的方法,需要的朋友可以参考下

  今天看到微博上说phpng也就是php7合并到master上了,大家都知道我是比较喜欢探讨最新版本的东西,看看有什么特性,我就忍不住升级去了,以前我的PHP版本是5.5.19,然后我就开始了。

  代码如下:

  yum install git

  git clone https://github.com/php/php-src.git

  然后编译配置参数,我的博客服务器是腾讯云服务器,因为是博客配置比较低。如下:

  代码如下:

  单核 Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz

  内存 2G

  下边是针对php5.5和phpNG版本的测试,当然我这是线上,也受网络环境的干扰,大家就看看的了,基准不对的哈。

  我的测试模拟的是然后开始100个并发, 100个请求的ab压测

  php5

  php7

  php5 的QPS是2.09

  php7 的QPS是3.67

  当然在测试的时候php5的最高负载时3.0,php7的最高负载时2.05,当然现在还是php7-dev

 

  所以PHP7的性能大家是可以看到的,只是我的服务器配置不给力测试的这个结果,大家可以自己测试看看

 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn