Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124087 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 935EF1A009C for ; Sun, 30 Jun 2024 11:53:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719748492; bh=lgw+vYjj3e9OlnglokHCwYw8yQklPyc/1D+RSFLJPSI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=E/8aItOSoAjqB1Ed9s8u5UgS1RxW3P4U18+i9813DlwlwWnIltaKExC8WsQAlEWj7 WD1xBwhvwobcq6RIYsq9TsucaP8a3u7hP0ZzYkDqEo/hSBLl+IFPDGELzkpbVC5EfU O/0z7tYxIIwDrgNPANekbNdfq9Ms6KEh3xyA7g7IpHoDXsmg+jThsIGTFxxo8ZxOis F7KS1YD9KX/zUre4LpkMT2YwmZaf7NRaZpkq5iyhgUcuF48NoIiG2h0bEpeReyb+aQ bDvRRrYQxpooJM8zS+2bZbxoI1NxSf4bkMhwC97e0Hp1G96taLh8xYDJDVMiZDwhBp 89y5G4QXAdewA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 710AE180EA2 for ; Sun, 30 Jun 2024 11:54:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sun, 30 Jun 2024 11:54:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1719748409; bh=i7LQEtI/ThezEc4RxYRVM8kmgrn6vCRjinae4OtMeLQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=Y5X0+u3bTSDAVO08Hbdbjuu3BjCmerAYfbGVDK8pHKAgNhZGBfelP7fofe2Dj0jt7 iRc06MwzRW+EcSGwftqpGifsAZBCyjQBhKyBwheanop19U3e/6aWcfzKjRIrnJXQGv RsQMymel4WcHR3fOzAEviuZeH9nAfZwG3/NrPu+fPQEH+sr8qqOBuve09ccnoJkBL3 z6Dml7B5a0G7A4TAa959naGcC7yG/UKz8Uhl2bXRSnL58Cf5pr90Ke57u0woMeUpFH TqvbnoBAvDYw2lL4AZzyMd0k4Rt14OnC3AWV4q0TrO3DebIfSp5TuXpZk7z9e4F3Vq 4ZTTI8YN7YjhQ== Message-ID: <3f68b714-21db-4fb9-94d1-a34b933f4a46@bastelstu.be> Date: Sun, 30 Jun 2024 13:53:27 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Subject: Re: [PHP-DEV] [RFC] Deprecations for PHP 8.4 To: mickmackusa Cc: Markus Podar , internals References: <3f230c9b-7aca-4bce-ab2a-544a10bf128f@bastelstu.be> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi On 6/29/24 23:23, mickmackusa wrote: >> >> 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 Yes, it does. > 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