php7新特性

目录

PHP 7.0.0 Alpha  使用新版的ZendEngine引擎,带来了许多新的特性,以下是不完全列表:

  • 性能提升:PHP7比PHP5.6性能提升了两倍。 Improved performance: PHP 7 is up to twice as fast as PHP 5.6
  • 全面一致的64位支持。 Consistent 64-bit support
  • 以前的许多致命错误,现在改成抛出异常。Many fatal errors are now Exceptions
  • 移除了一些老的不在支持的SAPI(服务器端应用编程端口)和扩展。Removal of old and unsupported SAPIs and extensions
  • 新增了空接合操作符。The null coalescing operator (??)
  • 新增加了结合比较运算符。Combined comparison Operator (<=>)
  • 新增加了函数的返回类型声明。Return Type Declarations
  • 新增加了标量类型声明。Scalar Type Declarations
  • 新增加匿名类。Anonymous Classes

https://wd-jishu.oss-cn-hangzhou.aliyuncs.com/wd/2019/10/php5与php7与-php7开启opcache性能对比.png@!large

https://wd-jishu.oss-cn-hangzhou.aliyuncs.com/wd/2019/10/php7与php5性能对比.png@!large

随机文章