Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126300 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 2177F1A00BC for ; Wed, 5 Feb 2025 22:58:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1738796121; bh=qMnwZKRK0aM5vjW5FqszOqy0ts8lsqZsJYoyBBo3UaA=; h=Date:Subject:To:References:From:In-Reply-To:From; b=iThmBM+CQ6eqdB3gYoJdVBuSlDAFbwwObWRTXjcgcK1W2IyM7fnMetiefgJt5yPYa I6LoxohUxT8owg+I12Odw+BzRKRLU/tFHLKP+tSIrMBLRQJMN6ownZ4CeQDDtwh/Of 4MuZXaowdsDzJDhLrFxJAdcPC/avQ1S2c26Mp9Doh6YazA+S9tTLgfs8RmArVuoFdp rdi1vqGzaZSuR6WHwdkgkQkSizspkq+wuui1rwEPmB4+mWGxlkmRIW0CUwpNQbYEqV 5FBITF0YGHkyHad0zoK7qbfXcCLytpbbYJQEvt0iygEBNa7djTRJX/nNLvR34lYBCl 8tHqudvQhvdlQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B9732180071 for ; Wed, 5 Feb 2025 22:55:18 +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.8 required=5.0 tests=BAYES_50,DMARC_MISSING, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from gavin.smtp.mailx.hosts.net.nz (gavin.smtp.mailx.hosts.net.nz [43.245.52.167]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 5 Feb 2025 22:55:17 +0000 (UTC) Received: from 222-153-153-210-fibre.sparkbb.co.nz ([222.153.153.210] helo=[192.168.1.68]) by gavin.smtp.mailx.hosts.net.nz with esmtpsa authed as varteg.nz (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128) (Exim 4.96) (envelope-from ) id 1tfoLH-005AYn-11 for internals@lists.php.net; Thu, 06 Feb 2025 11:57:59 +1300 Message-ID: <2b6d613d-86a4-4c01-9deb-78a9c2a3aaae@varteg.nz> Date: Thu, 6 Feb 2025 11:57:50 +1300 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] Empty subject in match and switch constructions To: internals@lists.php.net References: <2A357F88-BAF4-41DE-8646-6BBBF4EFF6F6@gmail.com> <99F2F71B-8BBA-449B-9FB4-54B1B608BB0A@gmail.com> <808f6c7a-369e-40af-8fe5-9f14317be756@app.fastmail.com> Content-Language: en-GB In-Reply-To: <808f6c7a-369e-40af-8fe5-9f14317be756@app.fastmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Hosts-DKIM-Check: none From: weedpacket@varteg.nz (Morgan) On 2025-02-05 09:49, Larry Garfield wrote: > > Feature-wise, I have to say I'd keep it strict-always, as both our PRs implement it. Yes, that means preg_match() wouldn't be able to slot in transparently. I'm frankly OK with that; hopefully pattern matching can be extended to a better regex syntax anyway in the future. > > Besides, the ugly need go no further than a (bool)preg_match(...) cast - which is just as strict and is more explicit about what is actually being compared.