Re: [RFC] [Discussion] PREG_THROW_ON_ERROR

From: Date: Thu, 30 Jul 2026 15:08:33 +0000
Subject: Re: [RFC] [Discussion] PREG_THROW_ON_ERROR
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-132135@lists.php.net to get a copy of this message
Am 28.07.2026 um 02:56 schrieb Osama Aldemeery <aldemeery@gmail.com>: > The flag only changes how an error is delivered. A call does exactly the same thing with it or > without it, byte for byte. > The only difference is that at the end, any error the call would have recorded is additionally > thrown, carrying the same code and > message > preg_last_error()/preg_last_error_msg() > would report. Reading the RFC and specifically the line > // The detailed "Compilation failed: ..." warning is still emitted, as always. I assume compilation (and other?) failures will then trigger BOTH the E_WARNING and an Exception? This sounds weird to me, do we have a precedent for this behavior? I would have expected the Exception to replace the E_WARNING. Regards, - Chris

« previous php.internals (#132135) next »