Re: Re: Combined assignment operator for short ternary
| From: | Sebastian Krebs | Date: | Sat, 25 Aug 2012 18:24:59 +0000 |
| Subject: | Re: Re: Combined assignment operator for short ternary | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-62496@lists.php.net to get a copy of this message | ||
Am 25.08.2012 01:53, schrieb Nikita Popov:
On Sat, Aug 25, 2012 at 1:49 AM, Sebastian Krebs <krebs.seb@gmail.com> wrote:Yes, makes sense... And thinking further I think myself it's better to keep it as it is. So thanks for your time :) Regards, SebastianHi, 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.