Re: Re: Combined assignment operator for short ternary

From: Date: Fri, 24 Aug 2012 23:49:13 +0000
Subject: Re: Re: Combined assignment operator for short ternary
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Am 25.08.2012 01:00, schrieb Stas Malyshev:
Hi!
To point that out: I _don't_ want to change the behaviour, which means | $foo['xy'] ?:= 'bar'; would trigger a notice like | $foo['xy'] = $foo['xy'] ?: 'bar';
Then I personally don't see much point in it. Saving a couple of keystrokes IMHO is not really worth it.
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? Regards, Sebastian

Thread (18 messages)

« previous php.internals (#62466) next »