Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100508 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38799 invoked from network); 10 Sep 2017 19:22:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Sep 2017 19:22:40 -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:29291] helo=mail.thelounge.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D9/31-10715-EF095B95 for ; Sun, 10 Sep 2017 15:22:39 -0400 Received: from srv-rhsoft.rhsoft.net (Authenticated sender: h.reindl@thelounge.net) by mail.thelounge.net (THELOUNGE MTA) with ESMTPSA id 3xr1Ct03zPzXMZ for ; Sun, 10 Sep 2017 21:22:33 +0200 (CEST) To: internals@lists.php.net References: Message-ID: <044d6dc6-63b4-5242-b910-f5a4fdf48eab@rhsoft.net> Date: Sun, 10 Sep 2017 21:22:33 +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=windows-1252; 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: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"