- Scalar type declarations
- Return type declarations
- Null coalescing operator
- Spaceship operator
- Constant arrays using define()
- Anonymous classes
- Unicode codepoint escape syntax
- Closure::call()
- Filtered unserialize()
- IntlChar
- Expectations
- Group use declarations
- Generator Return Expressions
- Generator delegation
- Integer division with intdiv()
- Session options
- preg_replace_callback_array()
- CSPRNG Functions
- list() can always unpack objects implementing ArrayAccess
- Constant expressions
- Variadic functions via ...
- Argument unpacking via ...
- Exponentiation via **
- use function and use const
- phpdbg
- Default character encoding
- php://input is reusable
- Large file uploads
- GMP supports operator overloading
- hash_equals() for timing attack safe string comparison
- __debugInfo()
- gost-crypto hash algorithm
- SSL/TLS improvements
- pgsql async support
- Generators added
- finally keyword added
- New password hashing API
- foreach now supports list()
- empty() supports arbitrary expressions
- array and string literal dereferencing
- Class name resolution via ::class
- OPcache extension added
- foreach now supports non-scalar keys
- Apache 2.4 handler supported on Windows
- Improvements to GD
- Support for traits has been added.
- Short array syntax has been added, e.g. $a = [1, 2, 3, 4]; or $a = ['one' => 1, 'two' => 2, 'three' => 3, 'four' => 4];.
- Function array dereferencing has been added, e.g. foo()[0].
- Closures now support $this.
- Class member access on instantiation has been added, e.g. (new Foo)->bar().
- Class::{expr}() syntax is now supported.
- Binary number format has been added, e.g. 0b001001101.
- Improved parse error messages and improved incompatible arguments warnings.
- The session extension can now track the upload progress of files.
- Built-in development web server in CLI mode.
- Support for namespaces has been added.
- Support for Late Static Bindings has been added.
- Support for jump labels (limited goto) has been added.
- Support for native Closures (Lambda/Anonymous functions) has been added.
- There are two new magic methods, __callStatic() and __invoke().
- Nowdoc syntax is now supported, similar to Heredoc syntax, but with single quotes.
- It is now possible to use Heredocs to initialize static variables and class properties/constants.
- Heredocs may now be declared using double quotes, complementing the Nowdoc syntax.
- Constants can now be declared outside a class using the const keyword.
- The ternary operator now has a shorthand form:
?:
. - The HTTP stream wrapper now considers all status codes from 200 to 399 to be successful.
- Dynamic access to static methods is now possible
- Exceptions can now be nested
- A garbage collector for circular references has been added, and is enabled by default.
- The mail() function now supports logging of sent email via the mail.log configuration directive. (Note: This only applies to email sent through this function.)