Home  >  Article  >  Backend Development  >  What new features have been added to php7?

What new features have been added to php7?

(*-*)浩
(*-*)浩Original
2019-10-10 13:31:345527browse

PHP 7 uses the new Zend Engine 3.0 to nearly double application performance and consume 50% more memory than PHP 5.6. It allows serving more concurrent users without requiring any additional hardware. PHP 7 is designed and refactored with today's workloads in mind.

What new features have been added to php7?

Summary of new PHP features

Improved performance - merge PHPNG code into PHP7 at the same speed as PHP 5 twice.

Reduced memory consumption - Optimized PHP 7 uses fewer resources. (Recommended learning: PHP Video Tutorial)

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

Consistent 64-bit Support - Consistent support for 64-bit architecture machines.

Improved Exception Hierarchy - The Exception Hierarchy has been improved

Many fatal errors are converted into thrown exceptions - The exception scope is increased to cover many fatal errors which are converted into thrown 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 and scalar type declarations - Support for added return types and parameter types.

Anonymous class - supports anonymous addition.

Zero-cost assertions - Support for zero-cost assertions was added.

The above is the detailed content of What new features have been added to 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