PHP 各版本特性
2017-12-20 18:10
99 查看
链接
PHP5.3PHP5.4
PHP5.5
PHP5.6
PHP7.0
PHP7.1
PHP7.2
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];ora = [‘one’ => 1, ‘two’ => 2, ‘three’ => 3, ‘four’ => 4];.
Function array dereferencing has been added, e.g. foo()[0].
Closures now support $this.
PHP 5.5.0 offers a wide range of new features:
Generators addedfinally 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 expressionsVariadic 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 declarationsReturn 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 typesVoid 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 typeExtension 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
相关文章推荐
- php5.3以后各版本的特性(主要是整理一下面试用的)
- PHP各个版本的新特性
- PHP语言特性和各版本的差异
- PHP升级到4.3版本之后改变了调用存储过程的一个特性
- PHP升级到4.3版本之后改变了调用存储过程的一个特性
- PHP升级到4.3版本之后改变了调用存储过程的一个特性
- PHP升级到4.3版本之后改变了调用存储过程的一个特性
- PHP升级到4.3版本之后改变了调用存储过程的一个特性
- PHP不同版本之特性
- PHP版本-对应的新特性
- php历代版本特性
- php5.6及其以上版本有了新特性,函数可以传入不定数目的参数
- PHP学习(四):PHP5.3版本的新特性
- PHP升级到4.3版本之后改变了调用存储过程的一个特性
- PHP升级到4.3版本之后改变了调用存储过程的一个特性
- PHP 从 5.3.x 到 7.1.x 各版本新增特性简明列表
- PHP5各个版本的新功能和新特性总结php5.4-5.6(二)
- PHP语言特性和各版本的差异
- php5.0到5.6的新特性,开发时应注意版本的兼容性