New featuresNew object typeA new type, object, has been introduced that can be used for (contravariant) parameter typing and (covariant) return typing of any objects.
Extension loading by name
Shared extensions no longer require their file extension
( Abstract method overridingAbstract methods can now be overridden when an abstract class extends another abstract class.
Sodium is now a core extensionThe modern Sodium cryptography library has now become a core extension in PHP. For a complete function reference, see the Sodium chapter. Password hashing with Argon2Argon2 has been added to the password hashing API, where the following constants have been exposed:
Extended string types for PDOPDO's string type has been extended to support the national character type when emulating prepares. This has been done with the following constants:
These constants are utilised by bitwise
Additional emulated prepares debugging information for PDOThe PDOStatement::debugDumpParams method has been updated to include the SQL being sent to the DB, where the full, raw query (including the replaced placeholders with their bounded values) will be shown. This has been added to aid with debugging emulated prepares (and so it will only be available when emulated prepares are turned on). Support for extended operations in LDAPSupport for EXOP has been added to the LDAP extension. This has been done by exposing the following functions and constants:
Address Information additions to the Sockets extensionThe sockets extension now has the ability to lookup address information, as well as connect to it, bind to it, and explain it. The following four functions have been added for this:
Parameter type wideningParameter types from overridden methods and from interface implementations may now be omitted. This is still in compliance with LSP, since parameters types are contravariant.
Allow a trailing comma for grouped namespacesA trailing comma can now be added to the group-use syntax introduced in PHP 7.0.
proc_nice support on WindowsThe proc_nice function is now supported on Windows. pack and unpack endian supportThe pack and unpack functions now support float and double in both little and big endian. Enhancements to the EXIF extensionThe EXIF extension has been updated to support a much larger range of formats. This means that their format specific tags are now properly translated when parsing images with the exif_read_data function. The following new formats are now supported:
The EXIF functions exif_read_data and exif_thumbnail now support passing streams as their first argument. New features in PCRE
SQLite3 allows writing BLOBsSQLite3::openBlob now allows to open BLOB fields in write mode; formerly only read mode was supported. Oracle OCI8 Transparent Application Failover CallbacksSupport for Oracle Database Transparent Application Failover (TAF) callbacks has been added. TAF allows PHP OCI8 applications to automatically reconnect to a preconfigured database when a connection is broken. The new TAF callback support allows PHP applications to monitor and control reconnection during failover. Enhancements to the ZIP extensionRead and write support for encrypted archives has been added (requires libzip 1.2.0). The ZipArchive class now implements the Countable interface.
The |