On Fri, Aug 17, 2012 at 11:41 PM, Sebastian Krebs <krebs....@gmail.com>wrote:
> Hi, > > Don't know, how complicated this is (and also someone (not me) must > implement it, because I can't :X), but to be in sync with the operators the > short ternary operator should be usable in conjunction with the assignment > like the other binary operators. Don't know, if anybody understands me :D > So here is an example > > // instead of > $foo = $foo ?: 'default'; > // Just > $foo ?:= 'default'; > would this trigger a notice if $foo is not defined? if yes, then it would be different from the current behavior of the ternary operator. if no, then I would never use this. I mean if I have to set the variable before the check, then I would put the check into the assignment. -- Ferenc Kovács @Tyr43l - http://tyrael.hu