Hi Tim,

> I still believe wrapping is the correct choice, but I won't insist on it
> based on policy.

Fair enough. I think this is flexible enough to resolve
it...especially given that `PcreError` is not meant to be caught.

> Nevertheless the discussion that arised from it pointed
> out some other changes that should be made.

Yes!

> 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.

I agree with both.

I will update the RFC and the implementation in the next few days.

I am also aware of Gina's `Regex\CompiledRegex` RFC, and as much as I
like the idea, I am not quite sure it fully replaces the
`PREG_THROW_ON_ERROR` flag, although I think it still removes a
significant part of the motivation for it.

So what I will do is post my comments on the `Regex\CompiledRegex`
thread, and depending on how that discussion develops, I might park
this RFC until the other RFC reaches a vote. Otherwise, I will
continue with it.

Best,
Osama

Reply via email to