Re: Re: Combined assignment operator for short ternary

From: Date: Fri, 24 Aug 2012 23:53:48 +0000
Subject: Re: Re: Combined assignment operator for short ternary
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-62467@lists.php.net to get a copy of this message
On Sat, Aug 25, 2012 at 1:49 AM, Sebastian Krebs <krebs.seb@gmail.com> wrote: > Hi, > > It's like with any other compound operator: A _real_ reason isn't there. But > saying "It's not worth it" is something I can live with (even if I don't > know how much effort it would take ;)). I just asked myself: '?:' is (a kind > of?) binary operator and every other binary operator is available as > compound operator, so why not '?:', so I don't have to repeat the variable? No, every other binary operator is not available. If I interpret this right one could say that all short-circuiting operators are not available. E.g. you also can't write $foo &&= $bar; or $foo ||= $bar. The ?: operator also falls in this category of short-circuiting logical operators.

« previous php.internals (#62467) next »