- 为了改善执行效率与内存占用,新的版本添加了PHPNG功能。
- 引入了JIT引擎来动态编译Zend操作码为自然机器码,以此来达到更快的处理性能。这项功能允许随后的程序调用同一份代码,这样会运行快很多。
- AST(抽象语法树)是最新添加的功能,它可以增强支持PHP的扩展性和用户应用。
- 添加异步编程功能以支持同一个请求中的并行任务。
- 新的版本会支持独立的多线程网页服务器,这样可以使用一个单独的存储池处理很多并发的请求。

在CentOS/Fedora上安装PHP 7
- Git
- autoconf
- gcc
- bison
install git autoconf gcc bison
mkdir php7cd php7
git clone https:
[root@localhost php7]
Cloning into
...remote: Counting objects:
, done.remote: Compressing objects:
% (
/
), done.remote: Total
(delta
), reused
(delta
)Receiving objects:
% (
/
),
MiB |
MiB/s, done.Resolving deltas:
% (
/
), done.
php-src./buildconf
[root@localhost php-src]
buildconf: checking installation...buildconf: autoconf version
(ok)rebuilding aclocal.m4rebuilding configurerebuilding main/php_config.h.in
./configure /--prefix=$HOME/php7/usr /--with-config-file-path=$HOME/php7/usr/etc /--enable-mbstring /--enable-zip /--enable-bcmath /--enable-pcntl /--enable-ftp /--enable-exif /--enable-calendar /--enable-sysvmsg /--enable-sysvsem /--enable-sysvshm /--enable-wddx /--with-curl /--with-mcrypt /--with-iconv /--with-gmp /--with-pspell /--with-gd /--with-jpeg-dir=/usr /--with-png-dir=/usr /--with-zlib-dir=/usr /--with-xpm-dir=/usr /--with-freetype-dir=/usr /--with-t1lib=/usr /--enable-gd-native-ttf /--enable-gd-jis-conv /--with-openssl /--with-mysql=/usr /--with-pdo-mysql=/usr /--with-gettext=/usr /--with-zlib=/usr /--with-bz2=/usr /--with-recode=/usr /--with-mysqli=/usr/bin/mysql_config
creating libtoolappending configuration tag
to libtoolGenerating filesconfigure: creating ./config.statuscreating main/internal_functions.ccreating main/internal_functions_cli.c+--------------------------------------------------------------------+| License: || This software issubject to the PHP License, available in this || distribution in the file LICENSE. By continuing thisinstallation || process, you are bound by the terms of this license agreement. || If you do not agree with the terms of this license, you must abort || the installation process at this point. |+--------------------------------------------------------------------+Thank you for using PHP.config.status: creating php7.specconfig.status: creating main/build-defs.hconfig.status: creating scripts/phpizeconfig.status: creating scripts/man1/phpize
config.status: creating scripts/php-configconfig.status: creating scripts/man1/php-config
config.status: creating sapi/cli/php
config.status: creating sapi/cgi/php-cgi
config.status: creating ext/phar/phar
config.status: creating ext/phar/phar.phar
config.status: creating main/php_config.hconfig.status: executing default commands
make
Generating phar.phpGenerating phar.pharPEAR package PHP_Archive not installed: generated phar will require PHP
t forget to run
.
install
[root@localhost php-src]
Installing shared extensions:
Installing PHP CLI binary:
Installing PHP CLI man page:
Installing PHP CGI binary:
Installing PHP CGI man page:
Installing build environment:
Installing header files:
Installing helper programs:
program: phpizeprogram: php-configInstalling man pages:
page: phpize
page: php-config
Installing PEAR environment:
[PEAR] Archive_Tar - installed:
[PEAR] Console_Getopt - installed:
[PEAR] Structures_Graph- installed:
[PEAR] XML_Util - installed:
[PEAR] PEAR - installed:
Wrote PEAR system config file at: /root/php7/usr/etc/pear.confYou may want to add: /root/php7/usr/lib/php to your php.ini include_path/root/php7/php-src/build/shtool install -c ext/phar/phar.phar /root/php7/usr/binln -s -f /root/php7/usr/bin/phar.phar /root/php7/usr/bin/pharInstalling PDO headers:
sapi/cli
[root@localhost cli]# ./php -v
.
-dev (cli) (built:
:
:
)
(
)
-
v3.
-dev,
(
)
-
总结