Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109533 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 72672 invoked from network); 5 Apr 2020 12:08:45 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 5 Apr 2020 12:08:45 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2E1A81804C4 for ; Sun, 5 Apr 2020 03:36:06 -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-vs1-f47.google.com (mail-vs1-f47.google.com [209.85.217.47]) (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, 5 Apr 2020 03:36:05 -0700 (PDT) Received: by mail-vs1-f47.google.com with SMTP id z125so7807873vsb.13 for ; Sun, 05 Apr 2020 03:36:05 -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; bh=6r5ZXNYbSvvrcHtvLGECSd2A6+nw2n/YHFHpIi7tY9s=; b=LJMJHpHTnVbxWIIjr9MkGnq6nc8AgIwj6WY4t2ep2IsrmC2Ja2gZBS3B58EV6IyjdE udoqf6wHAfAXV4Wn96StmfGRm2h+/LpGzmWOVXRtWy5RWlw8fYmsH2m4GliNMpgN8nZ/ +ye62UL9U7vhuoFMrZQgJaj/Y/+BsdDchIw9Ur0NTlMb8svOYSTyNG1gnw4CNFKdwtaI FaKmEjCFaPELKbn4nmbctkhOz9HVNNo7mA5U2rf3w0VL+bjXKap4W8lPQBs2W7kR/2j0 ChsqaKz9klu0goltHDjkXb19rKwhyjxYqwqEqkQP4Y+tu1LNLCRG3wqc+A4ELN8UVy2t K4NQ== 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=6r5ZXNYbSvvrcHtvLGECSd2A6+nw2n/YHFHpIi7tY9s=; b=NdwtkkatyGUL1h5nhod6ERTVcnvTYikyVrSNDRC/jiA/zfo4WSBNO1Rgxp2VPnyVDD LRLrogw3BUjntrd8xvzhxZmpQ43bjzdDTQXK8AX4KqvUPXLuvrUBHAINzNj377q4RH3X wXV1fZEPmxqc7aPSJmtob0/CIiFRaYzIrfWy7oLErOo0zBrFp/BCXeIcB15AklKOJrdD 6V5XAXyL80tRdZtkl4MM4uIKZ0SD70z5/wdPF99yfcbcw8UPKXrh8B9NnyPpf6PsTm4A 2zMfGouw5kMOwkDqjmVgjDp3DibMMR4WK+/zO8GFEnVhWbqtauDII2U0iNiwv4ZruNIe jzKQ== X-Gm-Message-State: AGi0PuYQcIYauJ3Lw4gzYNby/YpnBas5rLytGvp0nknU7ugbrI/X5Suo P5VjHLzPmvhSS/Ke1Gw+OUj9/NIaeY+SYnedSw+77g== X-Google-Smtp-Source: APiQypIgpeqEcfAxDiKd+rpRB/WnxmByzrz3q42vmyyV8rQYy+cH0bdLcQ6RNtr6gamMf88alo2ZfRbWNJV2z5CdIpo= X-Received: by 2002:a67:6145:: with SMTP id v66mr12702017vsb.83.1586082964125; Sun, 05 Apr 2020 03:36:04 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 5 Apr 2020 11:35:53 +0100 Message-ID: To: Ilija Tovilo Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [VOTE] throw expression From: Danack@basereality.com (Dan Ackroyd) Hi Iija, During the discussion of the precedence, you wrote: > There is a reasonable way to recognize this, namely to check if the expression > after the throw keyword is of type ZEND_AST_OR or ZEND_AST_AND. The > expression above will fail with this message (given that $condition is false): Did the RFC get updated to address this? As the current behaviour listed* in the RFC seems wrong and surprising to me. cheers Dan Ack * relevant part: > $condition || throw new Exception('$condition must be truthy') > && $condition2 || throw new Exception('$condition2 must be truthy'); > // Evaluated as > $condition || (throw new Exception('$condition must be truthy') && $condition2 || (throw new Exception('$condition2 must be truthy')));