@@ -430,6 +430,20 @@ PHP 8.6 UPGRADE NOTES
430430 outcome is reported as 'accepted', 'rejected' or 'not_sent' in the
431431 early_data key of the crypto stream_get_meta_data() array.
432432
433+ - PCRE:
434+ . Added the PREG_THROW_ON_ERROR flag. When passed to a preg_*() function that
435+ accepts a $flags argument, any PCRE error reported by preg_last_error()
436+ throws a \PregException instead of emitting a warning or returning
437+ false/null. The exception's code and message are exactly what
438+ preg_last_error() and preg_last_error_msg() report for the same call: the
439+ flag changes how an error is delivered, not the error itself. This covers
440+ both compilation errors (such as a malformed pattern) and execution errors
441+ (such as an exhausted backtrack limit or malformed UTF-8 input under the /u
442+ modifier). preg_replace() and preg_filter() gained a $flags parameter to
443+ accept it. As on the non-flag path, by-reference outputs (the $matches and
444+ $count arguments) may already have been written when the \PregException is
445+ thrown, so a catch block should not assume they are left untouched.
446+
433447- PDO_PGSQL:
434448 . Added Pdo\Pgsql::ATTR_CHUNK_SIZE, the number of rows a statement fetches
435449 per chunk. A value of 1 or more enters the lazy fetch mode of
@@ -676,6 +690,10 @@ PHP 8.6 UPGRADE NOTES
676690 when OPENSSL_PKCS1_PSS_PADDING is used. It accepts an explicit length or
677691 one of the new OPENSSL_RSA_PSS_SALTLEN_* constants.
678692
693+ - PCRE:
694+ . preg_replace() and preg_filter() now accept an optional $flags argument
695+ (for PREG_THROW_ON_ERROR).
696+
679697- PDO_DBLIB:
680698 . When using persistent connections, there is now a liveness check in the
681699 constructor.
@@ -789,6 +807,9 @@ PHP 8.6 UPGRADE NOTES
789807 RFC: https://wiki.php.net/rfc/tls_session_resumption
790808 . Openssl\Psk
791809
810+ - PCRE:
811+ . PregException
812+
792813- SNMP:
793814 . enum: Snmp\Mib
794815 . enum: Snmp\OidOutput
@@ -863,6 +884,9 @@ PHP 8.6 UPGRADE NOTES
863884 . OPENSSL_RSA_PSS_SALTLEN_AUTO.
864885 . OPENSSL_RSA_PSS_SALTLEN_MAX.
865886
887+ - PCRE:
888+ . PREG_THROW_ON_ERROR.
889+
866890- Sockets:
867891 . TCP_USER_TIMEOUT (Linux only).
868892 . AF_UNSPEC.
0 commit comments