Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109301 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 38977 invoked from network); 25 Mar 2020 18:04:11 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 25 Mar 2020 18:04:11 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 747281804C6 for ; Wed, 25 Mar 2020 09:28:54 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, MALFORMED_FREEMAIL,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS714 17.58.16.0/20 X-Spam-Virus: No X-Envelope-From: Received: from mr85p00im-zteg06021901.me.com (mr85p00im-zteg06021901.me.com [17.58.23.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 25 Mar 2020 09:28:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1585153732; bh=okpeOyKGahiypuj12MJZvhgGy7SFMMTGIe81o10Ggzc=; h=Date:Subject:From:To:Message-ID:Content-type; b=Z/WWL5E5+cpbygPMLRGmBjBSl3z2qHy6ogWxGyaTzcq68EciI1vvTAGoD2JRrgFqT 0F3P4izNbUxejKAwx3X1t5iTmO/at3VxXCFCFb4PmbvT/uG7OtA7hBPtYgS2hAhJkW t84cyffHErAlAigwzdZcyIxcIotblXuQN5eHjVr3ZGD9CG7fXKQoL56uL83TplAZsP hNZ9urTzRqcltx6f5hE2YxYS4pUQlzTFcHEkyEb+TWkMd1xYiC9eZL/ESf/s0S144k DOkW9cYyhw5HCDDkXqrT0e/I6m5E3PaQCnrMfxSbNznrq73jtaNzGYbHCPAayc5dm8 hpRwLJ5KbGwPA== Received: from [192.168.43.208] (197.226.197.178.dynamic.wless.zhbmb00p-cgnat.res.cust.swisscom.ch [178.197.226.197]) by mr85p00im-zteg06021901.me.com (Postfix) with ESMTPSA id 9C77D720480 for ; Wed, 25 Mar 2020 16:28:51 +0000 (UTC) User-Agent: Microsoft-MacOutlook/16.35.20030802 Date: Wed, 25 Mar 2020 17:28:40 +0100 To: php internals Message-ID: Thread-Topic: [PHP-DEV] [RFC] switch expression References: <047092C7-84FB-42AB-8084-7B83F76F55C1@me.com> <4513B88E-CA5B-4DF2-94C8-242BEE54ADCC@me.com> <767910ef-d27b-404c-9ad1-037105c69d12@www.fastmail.com> <2E98378A-605D-40ED-898C-6ABBFBD091B9@me.com> In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2020-03-25_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 mlxlogscore=374 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-2003250132 Subject: Re: [PHP-DEV] [RFC] switch expression From: ilija.tovilo@me.com (Ilija Tovilo) Hi Rowan > The problem with that is that it requires a temporary variable to be > switched on. If I want to switch on, say, a method call, I can write this > for equality: I agree. The iffy part would be recognizing if the case expression should be equated to the switch input or evaluated on its own. That is still something we could address in a later RFC for both the statement and expression. Regards