Home>Article>Backend Development> What new features have been added to php7?
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.
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!