@@ -45,6 +45,12 @@ PHP 8.5 UPGRADE NOTES
4545 change, but should more closely match user expectations, demonstrated by
4646 GH-15753 and GH-16198.
4747
48+ - DOM:
49+ . Cloning a DOMNamedNodeMap, DOMNodeList, Dom\NamedNodeMap, Dom\NodeList,
50+ Dom\HTMLCollection, and Dom\DtdNamedNodeMap now fails.
51+ This never actually resulted in a working object,
52+ so the impact should actually be zero.
53+
4854- FileInfo:
4955 . finfo_file() and finfo::file() now throws a ValueError instead of a
5056 TypeError when $filename contains nul bytes.
@@ -182,6 +188,16 @@ PHP 8.5 UPGRADE NOTES
182188 first redirect thus if there is any follow up redirect, it won't go
183189 any further. CURLFOLLOW_ALL is equivalent to setting CURLOPT_FOLLOWLOCATION
184190 to true.
191+ . Added support for CURLINFO_CONN_ID (libcurl >= 8.2.0) to the curl_getinfo()
192+ function. This constant allows retrieving the unique ID of the connection
193+ used by a cURL transfer. It is primarily useful when connection reuse or
194+ connection pooling logic is needed in PHP-level applications. When
195+ curl_getinfo() returns an array, this value is available as the "conn_id" key.
196+ . Added support for CURLINFO_QUEUE_TIME_T (libcurl >= 8.6.0) to the curl_getinfo()
197+ function. This constant allows retrieving the time (in microseconds) that the
198+ request spent in libcurl’s connection queue before it was sent.
199+ This value can also be retrieved by passing CURLINFO_QUEUE_TIME_T to the
200+ curl_getinfo() $option parameter.
185201
186202- DOM:
187203 . Added Dom\Element::$outerHTML.
@@ -228,6 +244,16 @@ PHP 8.5 UPGRADE NOTES
228244 process was terminated unexpectedly. In such cases, a warning is emitted
229245 and the function returns false. Previously, these errors were silently
230246 ignored. This change affects only the sendmail transport.
247+ . getimagesize() now supports HEIF/HEIC images.
248+
249+ - Standard:
250+ . getimagesize() now supports SVG images when ext-libxml is also loaded.
251+ Similarly, image_type_to_extension() and image_type_to_extension()
252+ now also handle IMAGETYPE_SVG.
253+ . The array returned by getimagesize() now has two additional entries:
254+ "width_unit" and "height_unit" to indicate in which units the dimensions
255+ are expressed. These units are px by default. They are not necessarily
256+ the same (just to give one example: one may be cm and the other may be px).
231257
232258- XSL:
233259 . The $namespace argument of XSLTProcessor::getParameter(),
@@ -265,6 +291,12 @@ PHP 8.5 UPGRADE NOTES
265291 it is visible; if there are nested output handlers the next one will still
266292 be used.
267293 RFC: https://wiki.php.net/rfc/deprecations_php_8_4
294+ . Trying to produce output (e.g. with `echo`) within a user output handler
295+ is deprecated. The deprecation warning will bypass the handler producing the
296+ output to ensure it is visible; if there are nested output handlers the next
297+ one will still be used. If a user output handler returns a non-string and
298+ produces output, the warning about producing an output is emitted first.
299+ RFC: https://wiki.php.net/rfc/deprecations_php_8_4
268300
269301- Hash:
270302 . The MHASH_* constants have been deprecated. These have been overlooked
@@ -349,7 +381,7 @@ PHP 8.5 UPGRADE NOTES
349381- Sockets:
350382 . socket_create_listen, socket_bind and socket_sendto throw a
351383 ValueError if the port is lower than 0 or greater than 65535,
352- also if any of the hints array entry is indexes numerically.
384+ and also if any of the hints array entries are indexed numerically.
353385 . socket_addrinfo_lookup throws a TypeError if any of the hints
354386 values cannot be cast to int and can throw a ValueError if
355387 any of these values overflow.
@@ -359,6 +391,8 @@ PHP 8.5 UPGRADE NOTES
359391 . socket_create/socket_bind can create AF_PACKET family sockets.
360392 . socket_getsockname gets the interface index and its string
361393 representation with AF_PACKET socket.
394+ . socket_set_option with multicast context throws a ValueError
395+ when the created socket is not of AF_INET/AF_INET6 family.
362396
363397- Tidy:
364398 . tidy::__construct/parseFile/parseString now throws a ValueError
@@ -384,8 +418,10 @@ PHP 8.5 UPGRADE NOTES
384418 . get_exception_handler() allows retrieving the current user-defined exception
385419 handler function.
386420 RFC: https://wiki.php.net/rfc/get-error-exception-handler
387- . The clone language construct is now a function.
421+ . The clone language construct is now a function and supports reassigning
422+ (readonly) properties during cloning via the new $withProperties parameter.
388423 RFC: https://wiki.php.net/rfc/clone_with_v2
424+ . Added Closure::getCurrent() to receive currently executing closure.
389425
390426- Curl:
391427 . curl_multi_get_handles() allows retrieving all CurlHandles current
@@ -396,6 +432,7 @@ PHP 8.5 UPGRADE NOTES
396432 RFC: https://wiki.php.net/rfc/curl_share_persistence_improvement
397433
398434- DOM:
435+ . Added Dom\Element::getElementsByClassName().
399436 . Added Dom\Element::insertAdjacentHTML().
400437
401438- Enchant:
@@ -410,6 +447,9 @@ PHP 8.5 UPGRADE NOTES
410447 . Added grapheme_levenshtein() function.
411448 RFC: https://wiki.php.net/rfc/grapheme_levenshtein
412449
450+ - Opcache:
451+ . Added opcache_is_script_cached_in_file_cache().
452+
413453- Pdo\Sqlite:
414454 . Added support for Pdo\Sqlite::setAuthorizer(), which is the equivalent of
415455 SQLite3::setAuthorizer(). The only interface difference is that the
@@ -427,6 +467,7 @@ PHP 8.5 UPGRADE NOTES
427467 ReflectionConstant::getExtensionName() were introduced.
428468 . ReflectionConstant::getAttributes() was introduced.
429469 RFC: https://wiki.php.net/rfc/attributes-on-constants
470+ . ReflectionProperty::getMangledName() was introduced.
430471
431472- Sqlite:
432473 . Sqlite3Stmt::busy to check if a statement had been fetched
@@ -445,6 +486,13 @@ PHP 8.5 UPGRADE NOTES
445486 across multiple PHP requests.
446487 RFC: https://wiki.php.net/rfc/curl_share_persistence_improvement
447488
489+ - URI:
490+ . Uri\UriException, Uri\InvalidUriException, Uri\UriComparisonMode,
491+ Uri\Rfc3986\Uri, Uri\WhatWg\InvalidUrlException,
492+ Uri\WhatWg\UrlValidationErrorType, Uri\WhatWg\UrlValidationError,
493+ and Uri\WhatWg\Url are added.
494+ RFC: https://wiki.php.net/rfc/url_parsing_api
495+
448496========================================
4494978. Removed Extensions and SAPIs
450498========================================
@@ -459,7 +507,7 @@ PHP 8.5 UPGRADE NOTES
459507 CURLFOLLOW_FIRSTONLY.
460508
461509- Fileinfo:
462- . Upgraded to file 5.46.
510+ . Upgraded file from 5.45 to 5.46.
463511 . The return type of finfo_close() has been changed to true, rather
464512 than bool.
465513
@@ -468,8 +516,13 @@ PHP 8.5 UPGRADE NOTES
468516 library that was separated from ext/dom for being reused among other
469517 extensions. The new extension is not directly exposed to userland.
470518
519+ - URI:
520+ . An always enabled uri extension is added that can be used for handling
521+ URIs and URLs according to RFC 3986 and WHATWG URL.
522+ RFC: https://wiki.php.net/rfc/url_parsing_api
523+
471524- PCRE:
472- . Upgraded to pcre2lib from 10.44 to 10.45.
525+ . Upgraded pcre2lib from 10.44 to 10.45.
473526
474527- PDO_Sqlite:
475528 . Increased minimum release version support from 3.7.7 to 3.7.17.
@@ -485,11 +538,14 @@ PHP 8.5 UPGRADE NOTES
485538
486539- Core:
487540 . PHP_BUILD_DATE.
541+ . PHP_BUILD_PROVIDER.
488542
489543- Curl:
490544 . CURLINFO_USED_PROXY.
491545 . CURLINFO_HTTPAUTH_USED.
492546 . CURLINFO_PROXYAUTH_USED.
547+ . CURLINFO_CONN_ID.
548+ . CURLINFO_QUEUE_TIME_T.
493549 . CURLOPT_INFILESIZE_LARGE.
494550 . CURLFOLLOW_ALL.
495551 . CURLFOLLOW_OBEYCODE.
@@ -522,6 +578,9 @@ PHP 8.5 UPGRADE NOTES
522578 . T_VOID_CAST.
523579 . T_PIPE.
524580
581+ - Standard:
582+ . IMAGETYPE_SVG when libxml is loaded.
583+
525584========================================
52658511. Changes to INI File Handling
527586========================================
@@ -545,6 +604,11 @@ PHP 8.5 UPGRADE NOTES
545604 from being a multiple of loop iteration counts.
546605 It is recommended that this parameter is set to a prime number.
547606
607+ - OpenSSL:
608+ Added openssl.libctx to select the OpenSSL library context type. Either
609+ custom libctx for each thread can be used or a single global (default)
610+ libctx is used.
611+
548612========================================
54961312. Windows Support
550614========================================
@@ -593,6 +657,13 @@ PHP 8.5 UPGRADE NOTES
593657 . The `-z` or `--zend-extension` option has been removed as it was
594658 non-functional. Use `-d zend_extension=<path>` instead.
595659
660+ - PDO_ODBC
661+ . The fetch behaviour for larger columns has been changed. Rather than
662+ fetching 256 byte blocks, PDO_ODBC will try to fetch a larger block size;
663+ currently, this is the page size minus string overhead. Drivers that
664+ return SQL_NO_TOTAL in SQLGetData are also better handled as well.
665+ This should improve compatibility and performance. See GH-10809, GH-10733.
666+
596667========================================
59766814. Performance Improvements
598669========================================
@@ -627,6 +698,7 @@ PHP 8.5 UPGRADE NOTES
627698 . Improved unpack() performance with nameless repetitions by avoiding
628699 creating temporary strings and reparsing them.
629700 . Improved pack() performance.
701+ . Minor improvements in array_chunk() performance.
630702
631703- XMLReader:
632704 . Improved property access performance.
0 commit comments