On Tue, 3 Feb 2026 at 20:07, Len Woodward <[email protected]> wrote:
>
> Hi everyone,
>
> I think I've got this RFC into the expected state needed to announce it
and open discussion.
>
> 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.
>
> I'm both excited and anxious to see what you all think of it.
>
> Cheers,
> Len

Hi Len,

Thank you for the proposal, and congratulations on your first RFC!

However, I am not in favor of this specific change. Unlike commas, which
serve as separators, binary operators functionally demand a right-hand
operand. Allowing a trailing operator breaks this fundamental expectation
and introduces unnecessary ambiguity.

As a maintainer of a handwritten PHP parser (mago
<https://github.com/carthage-software/mago>), I can attest that supporting
this would be non-trivial. PHP's operator precedence/associativity is
already quite a mess (reference
<https://github.com/carthage-software/mago/blob/main/crates/syntax/src/parser/internal/expression.rs#L738-L797>),
and introducing trailing boolean operators adds parsing complexity without
providing proportional value to the language.

Cheers,
Seifeddine.

Reply via email to