PHP 7 is the latest version of PHP.It was released on 3-Dec-2015.PHP 7 offers fast performance for online applications and websites. PHP 7 contains so many cool features that are give below.
Some most significant feature of PHP 7 are given below.
Speed: PHP 7 is twice as fast as PHP 5.
Scalar type declarations: Now we can specify the type (int,float,array,etc) of variable that a function should return and parameters of functions.
Lower Memory Usage: Now we can specify the type (int,float,array,etc) of variable that a function should return and parameters of functions.
Improved Exception hierarchy: Exception hierarchy has been improved in PHP 7.
Anonymous Classes: Support for Anonymous Classes has been added in PHP 7 .
New operators : The null coalescing operator (??) is added..
The foundation of PHP 7 is a PHP branch that was originally dubbed PHP next generation (phpng). It was authored by Dmitry Stogov, Xinchen Hui and Nikita Popov.PHP 7 uses Zend Engine 3.0.
Spaceship Operator has been introduced in PHP 7.It returns -1, 0 or 1 when varible $a is respectively less than, equal to, or greater than varible $b.
n Older PHP version (PHP 5 >= 5.3.0), if we want to import Classes,constants and functions from the same namespace then we have to use the "use" statement multiple times.
Scalar type declarations has been introduced in PHP 7. Scalar type declaration has following two option.