Re: Implicit isset in ternary operator
| From: | Sanford Whiteman | Date: | Tue, 24 Jul 2012 17:54:32 +0000 |
| Subject: | Re: Implicit isset in ternary operator | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-61711@lists.php.net to get a copy of this message | ||
> My feeling is that either more complex expressions for operators with an
> implicit "isset" or "!empty" shouldn't work, or that they should cause
> notices.
That's exactly why I think we're going in the wrong direction by
speaking of an "alternate ternary" operator.
You're saying the basic ternary is (expr1) ? (expr2) : (expr3)
But the only notice-free alternate is (var) ?? (expr2) : (expr3)
This alternate is just going to cause confusion as it has a different,
more limited signature.
-- S.