Re: Implicit isset in ternary operator
| From: | Alex Aulbach | Date: | Mon, 23 Jul 2012 04:19:48 +0000 |
| Subject: | Re: Implicit isset in ternary operator | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-61639@lists.php.net to get a copy of this message | ||
2012/7/23 Sanford Whiteman <swhitemanlistens-software@cypressintegrated.com>:
>> I think that you can compare the situation to the short if syntax ($a > $b
>> ? $c : $d)
>
> Not sure I understand... that *is* the situation under discussion,
> no?
Use functions. Above case for example:
_greater($a, $b, $c, $d)
where
function _greater($a, $b, $c, $d)
{
if ($a > $b) {
return $c;
}
return $d;
}
My suggestion just is: At any point everybody needs one more operator
for "his stuff". But that's why functions exists.
--
Alex Aulbach