Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109488 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 93095 invoked from network); 31 Mar 2020 21:03:09 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 31 Mar 2020 21:03:09 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 548181804E6 for ; Tue, 31 Mar 2020 12:29:24 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.169]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 31 Mar 2020 12:29:23 -0700 (PDT) Received: by mail-oi1-f169.google.com with SMTP id m14so20042399oic.0 for ; Tue, 31 Mar 2020 12:29:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MmI+vwE9LH5TFtZgA5185TbMX4J6r6Zayj90SxXiKPU=; b=oQLxtBNBYd7/OoSlJpZfbQefNgncCfhonAPIrh5MxxykISPA7dr97NqQLxlD6Pl7fr TVEb6s0rTNKv5RFQYeSTcaccxyct02AsaG8QIKsicXPpJtHBh3y2grZY3ZxaJsgDb2bt CAqor9cEYekQRHtQhguk7nt7cK6PtHyvKCDvFAEb4T78pEwRxeTxxiD9Bg5LzJlS4KsS 7mGwx6bNDmcmLGsq1m3E617o6RO1sK7jcuoCJqmGhJCHhhu4ZATG/nAQSOkE03Bl6a9f MwnGWIx7v2l+MjWfF6h1gGchmHWEzk3wdh2akPXwcrtBPls/974FATsjH+nQUPkF7eVK 63sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MmI+vwE9LH5TFtZgA5185TbMX4J6r6Zayj90SxXiKPU=; b=ATbjNLUyMy1A84uKIGMTgk52c9gqB55l7vlJ4PyFKTnLfxbcZPDn9CWEAuygx+L3EY 2lCFP3YpqWvDOgpH7/JLr26Wx8ckSBcCDaBpbbrjuHJ+fAyEEgbdEuYpJ34UfsKvPomt uVgxGSDcY26Wped7beSmW4SyIdKAjhjSCNiceb5l/a81TvFZ/RYLGCiPFiLxRiL3PHrv fQvGdVsdDcz93qqtiYJCiI6wDQPKvaADL67JoppUsaFpc2NOIdA1cWCbQstnBIZGqljp 7atpHb2vxlJwGc9qeMb9NGnyWajkwQwUEjLXqn120SruYdkARZWCVE2Q1EH+DjPGrYSy /xhA== X-Gm-Message-State: AGi0PuYQ7Ha2g13Wk18ThZ+9d4fP7X2gsEjbmPPBrpEPuJD+g9ddYZ0N aiH6MagkmTTk2J36XiWwry2rCfCqv/ihTBpt934= X-Google-Smtp-Source: APiQypKyO1U0Do3A3gh7BG7Ok2EgplDAgM13eY1EuD3ezNY+OIpA2TE6YCgGLgjXhHPjhraFHPXVRFSYozLHDVWy+FI= X-Received: by 2002:aca:cf0d:: with SMTP id f13mr340768oig.162.1585682961432; Tue, 31 Mar 2020 12:29:21 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 31 Mar 2020 16:29:09 -0300 Message-ID: To: Ilija Tovilo Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000a4842105a22b9557" Subject: Re: [PHP-DEV] [RFC][POLL] Switch expression From: david.proweb@gmail.com (David Rodrigues) --000000000000a4842105a22b9557 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable In relation to "Some people have asked why we don't reuse the syntax of the switch statement". I do not think that it could cause a conflict with an array. The same is valid for anonymous functions or classes: you need use terminator (";"). I still prefer it than create another format to switch. And maybe you should just use "return" here to specify the return value. $x =3D switch ($y) { case 1: return $y + 1; case 2: return $y - 1; // default: return null; }; Atenciosamente, David Rodrigues Em ter., 31 de mar. de 2020 =C3=A0s 15:51, Ilija Tovilo escreveu: > Hi internals > > A few days ago I opened the discussion on the switch expression RFC: > https://wiki.php.net/rfc/switch_expression > > There's been a fundamental disagreement on what the switch expression > should actually be. Due to the conflicting feedback I no longer know > how to proceed. This is why I've created a poll to get a general > feeling of what approach is preferred. If you can vote, **please**, > vote. > > https://wiki.php.net/rfc/poll_switch_expression > > Ilija > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --000000000000a4842105a22b9557--