Re: [RFC] Change the precedence of the concatenation operator

From: Date: Tue, 02 Apr 2019 09:14:00 +0000
Subject: Re: [RFC] Change the precedence of the concatenation operator
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-105032@lists.php.net to get a copy of this message
Den 2019-04-01 kl. 23:37, skrev Rowan Collins:
On 31/03/2019 14:50, Niklas Keller wrote:
An alternative to prevent mistakes in this regard is making this a compile error and requiring parenthesis.
If we're going to changes any precedence in the language, please please please can we look at the ternary operator associativity? I think making it non-associative, so that you have to use parentheses in "$a ? $b : $c ? $d : $e" would break very little code, in an obvious way, and help with a major pain point people have with the language. Regards, I recall that this was up for discussion a few years back for PHP 7.0, see:
https://marc.info/?l=php-internals&m=141851165925502 r//Björn L

« previous php.internals (#105032) next »