Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100510 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42030 invoked from network); 10 Sep 2017 19:35:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Sep 2017 19:35:25 -0000 Authentication-Results: pb1.pair.com header.from=lists@rhsoft.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=lists@rhsoft.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain rhsoft.net designates 91.118.73.15 as permitted sender) X-PHP-List-Original-Sender: lists@rhsoft.net X-Host-Fingerprint: 91.118.73.15 mail.thelounge.net Received: from [91.118.73.15] ([91.118.73.15:28105] helo=mail.thelounge.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 78/E1-10715-DF395B95 for ; Sun, 10 Sep 2017 15:35:25 -0400 Received: from srv-rhsoft.rhsoft.net (Authenticated sender: h.reindl@thelounge.net) by mail.thelounge.net (THELOUNGE MTA) with ESMTPSA id 3xr1Vd5c1ZzXMZ for ; Sun, 10 Sep 2017 21:35:21 +0200 (CEST) To: internals@lists.php.net References: <044d6dc6-63b4-5242-b910-f5a4fdf48eab@rhsoft.net> Message-ID: <66a056cc-87f6-3f5e-0417-6b8ab51cdbae@rhsoft.net> Date: Sun, 10 Sep 2017 21:35:21 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-CH Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Match expression From: lists@rhsoft.net ("lists@rhsoft.net") Am 10.09.2017 um 21:25 schrieb Ryan Pallas: > > > On Sep 10, 2017 1:23 PM, "lists@rhsoft.net " > > wrote: > > > > Am 10.09.2017 um 21:16 schrieb Theodore Brown: > > On Sunday, September 10, 2017 12:45 PM Rowan Collins > > wrote: > > Would it be possible to add an optional `$strict` > parameter to > switch? E.g. > ``` > switch ($i, true) { > > > I'd very much prefer a "strict switch ($i) { ... }" over > a second parameter. > > > What do either of you think of my "switch-use" proposal, > which would spell this as "switch ($i) use (===)"? > > That seems more complicated and confusing than either of the > other options. Normally `use()` is for inheriting variables in > anonymous functions. > > > where did you see `use()` in the proposed SYNTAX? > hint: it's not there > > it's just "strict switch" versus "switch" > > Rowan's suggestion included use the whole switch discussion is broken by design with "