据PHP官方发布的内容,2015年的10月份会发布第一版的PHP7,不过等不及了,在虚拟机上编译安装了PHP7.0.0-dev的开发版本。

php7 dev 可以通过从github.com获取到,项目地址:

http://github.com/php/php-src

生成配置文件:

#./buildconf

配置:

#./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --with-mcrypt --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --disable-fileinfo

编译安装:

#make
#sudo make install

好了,编译之后就可以通过命令查看PHP的版本号了:

#php -v
PHP 7.0.0-dev (cli) (built: May 17 2015 01:38:09) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0-dev, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies

关于性能上都有哪些提升,下次有时间了再进行测试!