PHP 7.1.0 正式发布

  • 发布:PHP培训
  • 来源:PHP资讯
  • 时间:2016-12-06 15:11

PHP 7.1.0 正式发布,有大量改进和新特性,可空类型、list 的方括号简写、void 返回类型 等等,达内php资讯频道就为大家做了整理,快来看看吧:

Session ID without hashing

Remove hash usage from session ID generation. (Created 2016-04-06)

Asynchronous Signal Handling

Asynchronous Signal Handling without TICKs and any additional overhead. (Created 2016-06-24)

Fix inconsistent behavior of $this variable

Fix all known inconsistencies related to special variable $this (Discussion began 2016-05-23)

删除 "Missing argument" 警告,改成 "Too few arguments" 异常

(Created 2016-06-01)

Nullable Types(可空类型)

Allow a type check to be of some type or null (Discussion began 2016-04-13)

Square bracket syntax for array destructuring assignment

An alternative syntax to list() (Created 2016-04-07)

Warn about invalid strings in arithmetic

Produce E_NOTICE or E_WARNING when using invalid numeric strings with arithmetic operators (Created 2016-01-08)

Allow specifying keys in list()

Adds syntax to help unpacking associative arrays into variables (Created 2016-01-17)


Iterable pseudo-type accepting arrays or objects implementing Traversable (Created 2016-06-10)

Generalize support of negative string offsets

Add support for negative string offsets everywhere it makes sense (Created 2016-01-23)

Closure from callable function

Add a function to create closures from callables without reflection

Deprecate mb_ereg_replace eval option

This RFC aims at deprecating the e option that mb_ereg_replace and mb_eregi_replace provide.

Deprecate (and remove) Mcrypt

Let's get rid of ext/mcrypt, which is abandonware and inhibits the growth of the language, as soon as humanly possible. (Created 2016-01-09)

OpenSSL AEAD support

Adds support for AEAD cipher modes (GCM and CCM) to openssl_decrypt and openssl_encrypt.

Void Return Type

Adds a void return type to require that a function does not return a value. (Revived 2015-10-04, originally created 2015-02-14)

Class constant visibility modifiers

Introduce class constants visibility modifiers that mirror properties and methods. (Created 2015/09/13)

Octal Overflow Protection

Stop quietly ignoring overflows in octal number parsing (Created: 2016-04-12)

RNG fixes and changes

Fixes and improvements to the random number generation subsystems (Created 2016-06-14)

Add HTTP/2 Server Push support to ext/curl (Created 2015/10/01)

TimeZone::getWindowsID (Created (2016/03/15)

Multi catch

Catching multiple exception types in a single catch statement (Created 2016/03/06)

Forbid dynamic calls to scope introspection functions (Created 2016-05-01)

增加 curl_multi_errno(), curl_share_errno() and curl_share_strerror() (Created: 2016-04-29)

Throw Error in Extensions

Convert E_ERROR and E_RECOVERABLE_ERROR to throw Error in extensions (Created 2016-06-14)

More precise float value handling

This RFC proposes more precise float value handling.

Additional Context in pcntl_signal Handler

Adds a second array argument to pcntl_signal handler (Created 2016-06-14)

新增 session_create_id() 方法

Add session_create_id() function (Created 2016-04-07)

新增 Add session_gc() 方法

Add session_gc() function (Created 2016-04-06)

本文只是简单摘录,详细信息需查看 PHP 官方 RFC :


上一篇:PHP 7.1 新特性
下一篇:PHP 7.1 中有哪些重大的更新?