Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109205 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 13494 invoked from network); 22 Mar 2020 18:52:38 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 22 Mar 2020 18:52:38 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2EB1C1801FD for ; Sun, 22 Mar 2020 10:16:32 -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.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE 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-ua1-f49.google.com (mail-ua1-f49.google.com [209.85.222.49]) (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 ; Sun, 22 Mar 2020 10:16:31 -0700 (PDT) Received: by mail-ua1-f49.google.com with SMTP id l7so4121086uap.8 for ; Sun, 22 Mar 2020 10:16:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basereality-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=/htHb2+5Wp/4u5CpCOd1ihBDE8V1SJVPO6vnr8b6f5Y=; b=gcMsEs0w5kf1FFfvo9f82ioF60oGp3f3dLBsOUdcdiQfv1DSdi5jdu1WVUiBPa9QFA 768M18TU30FANa0GcshYWKRUcexL8Pvw8ZJZLIaedgwNtBo7abJj+/vepgT++ZUC0Qxj D9MsfSFjyLF9Dap8GnMA1tcD1hDFqcvVJmc45qS6sJulTH3bLQG7+ew+d0k2NMYRU1ak TpsxLhuWn3hNl/0FwycxMui5zY4CsWYC3SItGxeLheOxRi+At/fKNYtQcO0k1ldH4fiw LHq8uVqSYHI13eouLOSbgfc2VLlN1bO2tqt9Hb6C6VRHi9pZdHSXXOMdbfHSvGfliz/P 84ng== 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:content-transfer-encoding; bh=/htHb2+5Wp/4u5CpCOd1ihBDE8V1SJVPO6vnr8b6f5Y=; b=QSkNwP6xlekh0CIzTmya1fRrpBKzKHN/iJJKHqjOgfMvIjrPfXdso84Uk2/bPy65tX 34/fQ+uWPnO8faJ5FZ1rsY3bmB09ukTwS4GnTdnvxea6C6MuMlR3TGzAegx3WTwR3cPZ 5uO3Wjck/pxNzm3P0YZM6DAwy0zueoXsFaBrKqIQSKPW2p5NFIpufFKYUUqP4e6XYPN+ x2/iD1zpgSZ5/RudD/rm08s2xpAgVn0Q1DzO/IAxwZs21HsGZuy6H8pLTbGm0TdYZLNw nzfpnLiHxety4xiJb90zBH1pYMaduR0jFy6crP050FGTgTk3PJ9HzpmZQ56i7hoRsZF6 1Bzg== X-Gm-Message-State: ANhLgQ20TW8SlQMr+poTJi4ku/ulSSGiG8ZtaNAAulM4Q4KV98/r2uRI rG/nxVQrOMhcIplPdVijOhfnL6DGZx0lJOht4Kjp3w== X-Google-Smtp-Source: ADFU+vsR0mqdMWZgZsw2xRElEeKidWMzJ1X3hNUhIowwtILGuIsqvv4AoPHHQfa0XaOG/Yb5WuhPQX6Rg17aQ0+5a6s= X-Received: by 2002:ab0:2553:: with SMTP id l19mr1211479uan.128.1584897390386; Sun, 22 Mar 2020 10:16:30 -0700 (PDT) MIME-Version: 1.0 References: <5BEF8264-4003-4056-A31C-FF8BEE85FED6@me.com> In-Reply-To: <5BEF8264-4003-4056-A31C-FF8BEE85FED6@me.com> Date: Sun, 22 Mar 2020 17:16:19 +0000 Message-ID: To: Ilija Tovilo Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC][DISCUSSION] throw expression From: Danack@basereality.com (Dan Ackroyd) On Sun, 22 Mar 2020 at 16:17, Ilija Tovilo wrote: > > Due to the modest feedback I=E2=80=99d like to move the throw expression = RFC to =E2=80=9Cunder discussion=E2=80=9D. > > https://wiki.php.net/rfc/throw_expression > Regarding the example: $condition || throw new Exception('$condition must be truthy') && $condition2 || throw new Exception('$condition2 must be truthy'); The "Deprecate left-associative ternary operator"* RFC made it so that parentheses are required when ternary operators are nested in complicated statements. Would a similar requirement for parentheses around complicated throw expressions be a suitable solution to avoid people being surprised by the behaviour? cheers Dan Ack * https://wiki.php.net/rfc/ternary_associativity