Home  >  Article  >  Backend Development  >  Summary of new features of PHP7

Summary of new features of PHP7

王林
王林Original
2019-11-12 17:40:192746browse

Summary of new features of PHP7

PHP 7 adds many features, the most important of which are described below:

• Performance Improvements – PHPNG code is merged in PHP7 and is as fast as PHP twice as much as 5.

• Lower memory consumption – Optimized PHP 7 uses fewer resources.

• Scalar type declarations - parameter and return types can now be enforced.

• 64-bit support – Consistent support for computers with 64-bit architecture.

• Exception Hierarchy – The exception hierarchy has been improved.

• Many fatal errors converted to exceptions - The exception range has been increased to include many fatal errors converted as exceptions.

• Secure Random Number Generator - Added new secure random number generator API.

• Deprecated SAPIs and extensions removed - Various old and unsupported SAPIs and extensions have been removed from the latest version.

• Null coalescing operator (??) - New null coalescing operator added.

• Return type and scalar type declaration – Support for adding return types and parameter types.

• Anonymous class - supports adding anonymity.

• Zero cost asserts - Supports adding Zero cost asserts.

PHP 7 uses the new Zend Engine 3.0 to improve application performance, with performance nearly twice that of PHP 5.6 and memory consumption improved by 50%. It allows serving more concurrent users without requiring any additional hardware. PHP 7 is designed and refactored with current workloads in mind.

Recommended tutorial: PHP tutorial

The above is the detailed content of Summary of new features of PHP7. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn