On June 11, the alpha version of the long-awaited PHP 7 was released. This release is the beginning of the seventh branch. The release of the final version is scheduled for November 2015. Under the cat is an incomplete list of the main innovations.
Improved performance. PHP 7 runs up to two times faster than PHP 5.6.
Added support for strings longer than 2 ^ 31 bytes in 64-bit builds.
Added method Closure :: call (object $ to [, mixed $ parameters]), which allows you to call an anonymous function with an arbitrary $ this.
Added \ u {xxxxxx} syntax for strings, allowing to specify arbitrary Unicode characters in strings.
Arrays can now be specified as values ​​of constants declared via define ().
Added new comparison operator <=>, also known as “spaceship operator”. The construction of $ a <=> $ b returns -1, 0 or +1 if $ a is respectively less, equal to or greater than $ b. Convenient to use in callbacks for usort ().
Reserved keywords can now be used as method names:
The PHP 4 style constructor syntax (the name of the constructor method is the same as the class name) is now deprecated.
Static calls (: :) non-static methods are now considered obsolete.
Added constant PHP_INT_MIN.
Removed INI directive "asp_tags". Attempting to turn it on will result in a fatal error. Also removed support for ASP-style tags (<%).
Removed INI directive "always_populate_raw_post_data". The variable $ HTTP_RAW_POST_DATA is accordingly no longer available. Instead, use the input flow descriptor php: // input.
Iterating over an array using foreach () no longer shifts the internal pointer of the array, which can be obtained and modified using the current () / next () / reset () functions and the like. Also foreach by value now always works with a copy of the array.
The operator of the left bitwise shift (<<) by the number of bits exceeding the number of bits in the integer now always returns 0. Prior to this, the result depended on the processor architecture. A similar right shift always gives 0 or -1 depending on the sign of the original number (Shift does not affect the high bit responsible for the sign).
Strings containing hexadecimal numbers are now always treated as strings and not treated as numbers: is_numeric (“0xFF”) is now false, it used to be true with all the consequences.
Integers in 64-bit Windows builds are now represented as 64-bit, and not as before, 32-bit, which made the use of x64 builds on Windows a pointless exercise if manipulations with large numbers are needed.
Removed support for the / e modifier in PCRE. Similar functionality can be implemented by the preg_replace_callback () function.
Added type-hint support for scalar types. Previously, type control was possible only for classes, interfaces, arrays, and callable type.
Removed old and not supported SAPI and extensions.
A more detailed list of changes in English can be found in these sources: