php各个版本的更新内容,PHP各版本特性

链接

PHP 5.3.0 offers a wide range of new features:

Support for namespaces has been added.

Support for Late Static Bindings has been added.

Support for jump labels (limited goto) has been added.

Support for native Closures (Lambda/Anonymous functions) has been added.

There are two new magic methods, __callStatic() and __invoke().

Nowdoc syntax is now supported, similar to Heredoc syntax, but with single quotes.

It is now possible to use Heredocs to initialize static variables and class properties/constants.

Heredocs may now be declared using double quotes, complementing the Nowdoc syntax.

Constants can now be declared outside a class using the const keyword.

The ternary operator now has a shorthand form: ?:.

The HTTP stream wrapper now considers all status codes from 200 to 399 to be successful.

Dynamic access to static methods is now possible:

PHP 5.4.0 offers a wide range of new features:

Support for traits has been added.

Short array syntax has been added, e.g. $a = [1, 2, 3, 4]; or $a = ['one' => 1, 'two' => 2, 'three' => 3, 'four' => 4];.

Function array dereferencing has been added, e.g. foo()[0].

Closures now support $this.

= is now always available, regardless of the short_open_tag php.ini option.

Class member access on instantiation has been added, e.g. (new Foo)->bar().

Class::{expr}() syntax is now supported.

Binary number format has been added, e.g. 0b001001101.

Improved parse error messages and improved incompatible arguments warnings.

The session extension can now track the upload progress of files.

Built-in development web server in CLI mode.

PHP 5.5.0 offers a wide range of new features:

Generators added

finally keyword added

New password hashing API

foreach now supports list()

empty() supports arbitrary expressions

array and string literal dereferencing

Class name resolution via ::class

OPcache extension added

foreach now supports non-scalar keys

Apache 2.4 handler supported on Windows

Improvements to GD

PHP 5.6.0 offers a wide range of new features:

Constant expressions

Variadic functions via ...

Argument unpacking via ...

Exponentiation via **

use function and use const

phpdbg

Default character encoding

Large file uploads

GMP supports operator overloading

hash_equals() for timing attack safe string comparison

__debugInfo()

gost-crypto hash algorithm

SSL/TLS improvements

pgsql async support

PHP 7.0.0 offers a wide range of new features:

Scalar type declarations

Return type declarations

Null coalescing operator

Spaceship operator

Constant arrays using define()

Anonymous classes

Unicode codepoint escape syntax

Closure::call()

Filtered unserialize()

IntlChar

Expectations

Group use declarations

Generator delegation

Integer division with intdiv()

Session options

preg_replace_callback_array()

CSPRNG Functions

list() can always unpack objects implementing ArrayAccess

Class member access on cloning has been added, e.g. (clone $foo)->bar().

PHP 7.1.0 offers a wide range of new features:

Nullable types

Void functions

Symmetric array destructuring

Class constant visibility

iterable pseudo-type

Multi catch exception handling

Support for keys in list()

Support for negative string offsets

Support for AEAD in ext/openssl

Convert callables to Closures with Closure::fromCallable()

Asynchronous signal handling

HTTP/2 server push support in ext/curl

PHP 7.2.0 offers a wide range of new features:

New object type

Extension loading by name

Abstract method overriding

Sodium is now a core extension

Password hashing with Argon2

Extended string types for PDO

Additional emulated prepares debugging information for PDO

Support for extended operations in LDAP

Address Information additions to the Sockets extension

Parameter type widening

Allow a trailing comma for grouped namespaces

proc_nice() support on Windows

pack() and unpack() endian support

Enhancements to the EXIF extension

New features in PCRE

SQLite3 allows writing BLOBs

Oracle OCI8 Transparent Application Failover Callbacks

Enhancements to the ZIP extension

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值