昨日晚间,php7的第一个版本发布,于是,今天就在vmware workstation的虚拟机下安装尝试了一下。
- Improved performance: PHP 7 is up to twice as fast as PHP 5.6
- Consistent 64-bit support
- Many fatal errors are now Exceptions
- Removal of old and unsupported SAPIs and extensions
- The null coalescing operator (??)
- Combined comparison Operator (<=>)
- Scalar Type Declarations
- Anonymous Classes
php7发布时间表:
Date | Release |
---|---|
Jun 11 2015 | Alpha 1 |
Jun 25 2015 | Alpha 2 |
Jul 09 2015 | … |
Jul 23 2015 | … |
Aug 06 2015 | … |
Aug 20 2015 | … |
Sep 03 2015 | … |
Sep 17 2015 | … |
Oct 01 2015 | … |
Oct 15 2015 | … |
Oct 29 2015 | … |
Nov 12 2015 | Final |
PHP 7.0.0 Alpha 1 包括最新版本的 Zend Engine,包括以下特性:
- 提升性能:PHP 7 速度是 PHP 5.6 的两倍
- 支持 64 位
- 许多重大错误可以进行异常处理
- 移除了旧的和不支持的 SAPIs 和扩展
- null 合并操作符(??)
- 结合比较运算符 (<=>)
- 标量类型声明
- 匿名类
1.下载地址https://downloads.php.net/~ab/ wget https://downloads.php.net/~ab/php-7.0.0alpha1.tar.gz
2解压进入文件夹
3.运行configure脚本文件 ./configure –prefix=/usr/local/php7 \
–with-apxs2=/usr/sbin/apxs \
–with-config-file-path=/usr/local/php7/etc \
–with-mcrypt=/usr/include \
–with-mysql=mysqlnd \
–with-mysqli=mysqlnd \
–with-pdo-mysql=mysqlnd \
–with-gd \
–with-iconv \
–with-zlib \
–enable-xml \
–enable-bcmath \
–enable-shmop \
–enable-sysvsem \
–enable-inline-optimization \
–enable-mbregex \
–enable-fpm \
–enable-mbstring \
–enable-ftp \
–enable-gd-native-ttf \
–with-openssl \
–enable-pcntl \
–enable-sockets \
–with-xmlrpc \
–enable-zip \
–enable-soap \
–without-pear \
–with-gettext \
–enable-session \
–with-curl \
–with-jpeg-dir \
–with-freetype-dir \
–enable-opcache
如果没有安装相应的支持,会提示找不到xx.h,安装完再执行configure
4.编译安装 make && make install
5.编辑apache httpd.conf配置文件
增加AddType application/x-httpd-php .php
LoadModule php7_module /usr/lib/httpd/modules/libphp7.so