PHP 8.7 UPGRADE NOTES 1. Backward Incompatible Changes 2. New Features 3. Changes in SAPI modules 4. Deprecated Functionality 5. Changed Functions 6. New Functions 7. New Classes and Interfaces 8. Removed Extensions and SAPIs 9. Other Changes to Extensions 10. New Global Constants 11. Changes to INI File Handling 12. Windows Support 13. Other Changes 14. Performance Improvements ======================================== 1. Backward Incompatible Changes ======================================== - Curl: . curl_multi_exec() now throws a TypeError when still_running is not an int. . Nested arrays in CURLOPT_POSTFIELDS now throw a TypeError, instead of being silently converted to the string "Array". - PDO: . PDOStatement::bindColumn() now throws a ValueError when the column name is not present in the result set. It previously reported the condition through PDO::ATTR_ERRMODE and returned false. - Session: . Setting session.cookie_path to a value containing one of ";\r\n", or session.cookie_domain to a value containing one of ",; \t\r\n\013\014", now emits a warning and leaves the setting unchanged. Previously such a value was appended to the Set-Cookie header verbatim, which let an application terminate one attribute and append further ones. - Standard: . The number of filters that can be chained in a php://filter URL is limited to 16 by default. Set the stream context option max_filter_count to change this. ======================================== 2. New Features ======================================== - Curl: . Multiple files can now be uploaded with the same field name by passing an array of CURLFile or CURLStringFile objects to CURLOPT_POSTFIELDS. - Intl: . Locale::acceptFromHttp() and locale_accept_from_http() now accept an optional $availableLocales array argument. When given, the Accept-Language header is matched against these locales instead of all locales known to ICU, and the matching entry is returned as passed. A ValueError is thrown if the array is empty or contains an invalid locale, and a TypeError if it contains a non-string value. - Streams: . The so_linger, so_rcvbuf and so_sndbuf stream socket context options are now also applied to unix and unix datagram sockets. ======================================== 3. Changes in SAPI modules ======================================== ======================================== 4. Deprecated Functionality ======================================== ======================================== 5. Changed Functions ======================================== - Standard: . stream_select() no longer fails once a watched descriptor exceeds FD_SETSIZE. The descriptor set now grows on demand on both POSIX (bitset) and Windows (winsock fd_set), so code watching many streams works without rebuilding PHP with --enable-fd-setsize. On Windows, selecting on more than 64 pipe or file handles no longer crashes; it fails with a warning, as that path remains bounded by WaitForMultipleObjects(). ======================================== 6. New Functions ======================================== - Intl: . Added Transliterator::toRules() and transliterator_to_rules() to export rules that can be used to recreate a transliterator. The optional $escapeUnprintable argument escapes unprintable characters when true. ======================================== 7. New Classes and Interfaces ======================================== ======================================== 8. Removed Extensions and SAPIs ======================================== ======================================== 9. Other Changes to Extensions ======================================== ======================================== 10. New Global Constants ======================================== ======================================== 11. Changes to INI File Handling ======================================== ======================================== 12. Windows Support ======================================== ======================================== 13. Other Changes ======================================== ======================================== 14. Performance Improvements ======================================== - Standard: . Improved performance of strcspn() and strpbrk() when searching longer strings with a single-byte character mask. . Improved performance of array_chunk() when not preserving keys. . Improved performance of array_splice() when inserting without removing elements. . Improved performance of str_rot13(). . Improved performance of pack() for large strings using the a, A and Z formats. . Improved performance of htmlspecialchars(), htmlentities(), html_entity_decode() and get_html_translation_table(), especially with UTF-8. . htmlspecialchars() returns its input without copying it when nothing needs encoding. - MBString: . Improved performance of mb_strlen for UTF-8 strings. - PDO_PGSQL: . Improved performance of the SQL parser that handles placeholders in PDO::prepare() and, with emulated prepares, PDOStatement::execute().