Re: what happened to that new isset() like language
| From: | Matthew C. Kavanagh | Date: | Sat, 29 Oct 2005 20:41:36 +0000 |
| Subject: | Re: what happened to that new isset() like language | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-19823@lists.php.net to get a copy of this message | ||
However, in terms of precedents, there are the combined assignment
operators such as &=, +=, .=, and so on. They would suggest that
$a ||= $b;
should be equivalent to
$a = $a || $b;
So I don't think ||= in the suggested usage is intuitive. And adding
strange automagical meanings to $a = $a || $b || $c; (and so forth)
shouldn't even be discussed by sane people ;)
On Sat, 2005-10-29 at 13:27 -0700, James Crumpton wrote:
> Regardless of what can be said about changing the behavior of '||', the
> same isn't true for '||=', as it has no precedence in PHP.