News Ticker

Whats new in PHP 7 Features, Changes, Performance etc

By Vijay Makwana - Friday, June 26 No Comments






The PHP development team announces the immediate availability of PHP 7.0.0 Alpha 2. This is the second pre-release of the new PHP 7 major series. All users of PHP are encouraged to test this version carefully, and report any bugs and incompatibilities in the bug tracking system.

NOTE: THIS IS A DEVELOPMENT PREVIEW - DO NOT USE IT IN PRODUCTION!

Alpha 2 introduces the new Throwable interface and changes to the Exception hierarchy and about 25 bug fixes reported since the first alpha.

PHP 7.0.0 comes with new version of the Zend Engine with features such as (incomplete list):

Features:

  •     Improved performance: PHP 7 is up to twice as fast as PHP 5.6
  •     Consistent 64-bit support
  •     Many fatal errors are now Exceptions
  •     Removal of old and unsupported SAPIs and extensions
  •     The null coalescing operator (??)
  •     Combined comparison Operator (<=>)
  •     Return Type Declarations
  •     Scalar Type Declarations
  •     Anonymous Classes
  •     Combined Comparison Operator
  •     Null Coalesce Operator
  •     Scalar Type Declarations
  •     Return Type Declarations
  •     Anonymous Classes
  •     Unicode Codepoint Escape Syntax
  •     Closure call() Method
  •     Filtered unserialize()
  •     IntlChar Class
  •     Expectations
  •     Group use Declarations
  •     Generator Return Expressions
  •     Generator Delegation
  •     Integer Division with intdiv()
  •     session_start() Options
  •     preg_replace_callback_array() Function

Changes:
  •     Loosening Reserved Word Restrictions
  •     Uniform Variable Syntax
  •     Exceptions in the Engine
  •     Throwable Interface
  •     Integer Semantics
  •     JSON Extension Replaced with JSOND
  •     ZPP Failure on Overflow
  •     Fixes to foreach()'s Behaviour
  •     Changes to list()'s Behaviour
  •     Fixes to Custom Session Handler Return Values
  •     Deprecation of PHP 4-Style Constructors
  •     Removal of date.timezone Warning
  •     Removal of Alternative PHP Tags
  •     Removal of Multiple Default Blocks in Switch Statements
  •     Removal of Dead Server APIs
  •     Removal of Hex Support in Numerical Strings
  •     Removal of Deprecated Functionality
  •     Reclassification and Removal of E_STRICT Notices
  •     Deprecation of Salt Option for password_hash()
Performance:


Unarguably the greatest part about PHP 7 is the incredible performance boosts it provides to applications. This is a result of refactoring the Zend Engine to use more compact data structures and less heap allocations/deallocations.

The performance gains on real world applications will vary, though many applications seem to receive a ~100% performance boost - with lower memory consumption too!

The refactored codebase provides further opportunities for future optimisations as well (such as JIT compilation). So it looks like future PHP versions will continue to see performance enhancements too.

No Comment to " Whats new in PHP 7 Features, Changes, Performance etc "