Re: [RFC] [VOTE] PREG_THROW_ON_ERROR
| From: | Tim Düsterhus | Date: | Mon, 21 Sep 2026 16:46:53 +0000 |
| Subject: | Re: [RFC] [VOTE] PREG_THROW_ON_ERROR | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-132580@lists.php.net to get a copy of this message | ||
Hi
On 2026-09-20 03:08, Osama Aldemeery wrote:
However, if you still read the throwable policy as requiring the wrap, then I believe this is now a question about the policy rather than this RFC, and I would not want the RFC to hinge on this one question, so I scanned the top 4865 packages to see the cost of putting that one question aside, and here are the results:I still believe wrapping is the correct choice, but I won't insist on it based on policy. Nevertheless the discussion that arised from it pointed out some other changes that should be made. Specifically: - Most of the errors (e.g. syntax error in regex) should be PcreError instead, since they are not meant to be caught. - preg_last_error() should remain untouched. Best regards Tim Düsterhus