@@ -427,6 +427,20 @@ PHP 8.6 UPGRADE NOTES
427427 outcome is reported as 'accepted', 'rejected' or 'not_sent' in the
428428 early_data key of the crypto stream_get_meta_data() array.
429429
430+ - PCRE:
431+ . Added the PREG_THROW_ON_ERROR flag. When passed to a preg_*() function that
432+ accepts a $flags argument, any PCRE error reported by preg_last_error()
433+ throws a \PregException instead of emitting a warning or returning
434+ false/null. The exception's code and message are exactly what
435+ preg_last_error() and preg_last_error_msg() report for the same call: the
436+ flag changes how an error is delivered, not the error itself. This covers
437+ both compilation errors (such as a malformed pattern) and execution errors
438+ (such as an exhausted backtrack limit or malformed UTF-8 input under the /u
439+ modifier). preg_replace() and preg_filter() gained a $flags parameter to
440+ accept it. As on the non-flag path, by-reference outputs (the $matches and
441+ $count arguments) may already have been written when the \PregException is
442+ thrown, so a catch block should not assume they are left untouched.
443+
430444- PDO_PGSQL:
431445 . Added Pdo\Pgsql::ATTR_CHUNK_SIZE, the number of rows a statement fetches
432446 per chunk. A value of 1 or more enters the lazy fetch mode of
@@ -669,6 +683,10 @@ PHP 8.6 UPGRADE NOTES
669683 when OPENSSL_PKCS1_PSS_PADDING is used. It accepts an explicit length or
670684 one of the new OPENSSL_RSA_PSS_SALTLEN_* constants.
671685
686+ - PCRE:
687+ . preg_replace() and preg_filter() now accept an optional $flags argument
688+ (for PREG_THROW_ON_ERROR).
689+
672690- PDO_DBLIB:
673691 . When using persistent connections, there is now a liveness check in the
674692 constructor.
@@ -782,6 +800,9 @@ PHP 8.6 UPGRADE NOTES
782800 RFC: https://wiki.php.net/rfc/tls_session_resumption
783801 . Openssl\Psk
784802
803+ - PCRE:
804+ . PregException
805+
785806- SNMP:
786807 . enum: Snmp\Mib
787808 . enum: Snmp\OidOutput
@@ -856,6 +877,9 @@ PHP 8.6 UPGRADE NOTES
856877 . OPENSSL_RSA_PSS_SALTLEN_AUTO.
857878 . OPENSSL_RSA_PSS_SALTLEN_MAX.
858879
880+ - PCRE:
881+ . PREG_THROW_ON_ERROR.
882+
859883- Sockets:
860884 . TCP_USER_TIMEOUT (Linux only).
861885 . AF_UNSPEC.
0 commit comments