Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130003 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id D25B91A00BC for ; Wed, 4 Feb 2026 08:24:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1770193459; bh=toTg6dLuEGSfuJDvWw/AYV2J2FLByw4vQmjtGSx1azw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=FbPAXSXF1nm6TtRtleccN6Y6lqpGbsbMKuHY5bR5TQRGtUu5VPxK3YWzqkR/gWar+ 7C9rKsHoANNa0/ouW1PaHnB4IVL+8oo47036OQa0jTmVQHGYFJERAN5HsN955oTm1v pV4EBLdl7eee2p/KUvlItPVlsO+U0BYa0x1cOZadXW9fHU5N+L1Aea8xbuheogwNbP 4IjQpaolj8CvNKNh4Vwl48bEMvwADvYsUvIVvcl1NvPQyIH37dFHbrHxr+tmclB+xC axakSFPymCR9OXbWt35vnzSVH1CDfOawteiKKege+j2rukRolaLCQv0RvX2V1qMGQc 1pSzScjWQrAAQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 94B1A180050 for ; Wed, 4 Feb 2026 08:24:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from forward501d.mail.yandex.net (forward501d.mail.yandex.net [178.154.239.209]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 4 Feb 2026 08:24:17 +0000 (UTC) Received: from mail-nwsmtp-smtp-production-main-76.iva.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-76.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:1a9f:0:640:207a:0]) by forward501d.mail.yandex.net (Yandex) with ESMTPS id 12216809D6 for ; Wed, 04 Feb 2026 11:24:10 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-76.iva.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id 8Ok6nJHGHGk0-Wvgfzth1; Wed, 04 Feb 2026 11:24:09 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=php.watch; s=mail; t=1770193449; bh=toTg6dLuEGSfuJDvWw/AYV2J2FLByw4vQmjtGSx1azw=; h=To:Subject:Message-ID:References:Date:From:In-Reply-To:Cc; b=VMsMlBvgYk/MYROz/YAxpfus2hjNFj7XoE0M61lTHpnGESa1SYrPt/DP6j+kzbNQT 4xA6FYZH3wxv/2mCW46xK/ZCzuURDgidKMnq4acPZ8PtgQkuvBsi5Grw52DkQnTbFB xep+SpQ7u1TrP2WbTabkglUSmSblemmjrEOuE+kA= Authentication-Results: mail-nwsmtp-smtp-production-main-76.iva.yp-c.yandex.net; dkim=pass header.i=@php.watch Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-b883c8dfb00so1505169366b.1 for ; Wed, 04 Feb 2026 00:24:08 -0800 (PST) X-Gm-Message-State: AOJu0YxlANDlHyjwPPjGpIZYquypRZQFcvSrtXQYJrjE8z5blX3y0toI km20ktS1iw8/StWcob2j2RNXKSsHGXZUgbfxnSSio05qaoerhEd0JCbP1XYr1AmT5uGBdKzoGSp Z9hkhh0psD98KpW81x0QDOElzopcTLhM= X-Received: by 2002:a17:907:26cc:b0:b88:68b6:e578 with SMTP id a640c23a62f3a-b8e9f2b3c23mr174854566b.25.1770193448292; Wed, 04 Feb 2026 00:24:08 -0800 (PST) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 4 Feb 2026 13:53:40 +0530 X-Gmail-Original-Message-ID: X-Gm-Features: AZwV_QiXZuC9aHP_8-kWKo7STRQLh9pcneQLarPploZK5FBLD7keC4nbEqABOV4 Message-ID: Subject: Re: [PHP-DEV] [RFC] Trailing Boolean Operators To: Len Woodward Cc: internals@lists.php.net Content-Type: text/plain; charset="UTF-8" From: ayesh@php.watch (Ayesh Karunaratne) > > Trailing Boolean Operators > > If the link doesn't work, here's the raw url: > https://wiki.php.net/rfc/trailing_boolean_operators > > The TL;DR is that we allow what I'm calling a 'dangling' ('optional' might be the better word) trailing boolean operator. Mirroring trailing commas. It's designed to be a purely additive QoL improvement to help reduce diffs. > Hi Len, I see that this is your first RFC, welcome, and well done on the RFC draft. The RFC text is quite detailed, and clearly brings the idea across. I appreciate that you explained your rationale, with simple examples, and a well-defined scope. Greatly done. As for the idea, however, I do not agree that this would be a net-positive change. I wanted to echo what Ben said in his reply too. Commas are fundamentally different from the operators like `&&` and `||`. One is a separator, the other is an operator. Trailing separators do not add to the confusion, and the benefits you mention in the RFC are meaningful improvements that do not add to visual confusion. `&&` and `||` are binary operators that require a right-hand operand. Your RFC removes this requirement from the syntax, but I believe they semantically still require a right-hand operand. I'm also not aware of any other languages that allow trailing operators. For PHP to add trailing commas, it had a strong argument in favor because other languages like JavaScript, Python, and of course C (among many other languages) supported it, and adding support for trailing commas was a natural progression. Back then, even this was argued quite a lot in the RFC discussions, and some proposals did not pass the vote. As Ben mentioned, the new-line, operator, and operand pattern solves the diff issue. Besides, changing the order of an `if` block is a significant change, and at least for me, not something I do often. For changes like this, I would rather like it to have a more visually stark diff. Thanks, Ayesh.