Re: [RFC] Deprecations for PHP 8.4
| From: | Tim Düsterhus | Date: | Sun, 30 Jun 2024 11:53:27 +0000 |
| Subject: | Re: [RFC] Deprecations for PHP 8.4 | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-124087@lists.php.net to get a copy of this message | ||
Hi
On 6/29/24 23:23, mickmackusa wrote:
Yes, it does.If one can easily use a function incorrectly in a way that is not *immediately* apparent, then I consider the function to be badly designed.Does that philosophy also cover preg_quote()? I've lost count of the
Would it be reasonable to create preg_escape() which also (sometimes
unnecessrily) includes the (de facto default delimiter) forward slash in
its default list of escaped characters so that preg_quote() could
eventually be deprecated? As far as I know this would do no harm, will
I'd rather see the delimiter being a required parameter or a well-designed (object-oriented) API, such as the one provided by T-Regx: https://github.com/t-regx/T-Regx?tab=readme-ov-file#prepared-patterns
But as Gina said, this is something for another discussion.
Best regards
Tim Düsterhus