Hi,

Am Samstag, den 26.01.2008, 22:43 +0100 schrieb Johannes Schlüter:
[...]
>  ?: operator
>  [DOC] "expr1 ?: expr1" is a shortcut for: "expr1
>  ? expr1 : expr2" as exists in gcc and discussed some time back. Note
>  that this is not an implementation ifsetor($var, default). While
>  ifsetor would not generate any message for non existing variables or
>  array indices the ternary shortcut does. Also the ternary shortcut does
>  a boolean evaluation rather then checking for isset(). That way ther
>  ternary shortcut can work on any expression while ifsetor can only work
>  on variables. Also to be silent one has do do: "@$expr1 ?: $expr2".

Thanks for making this clear. That's exactly how I understood it and I
didn't read before about it. That's why I guess it is intuitive :-)

cu, Lars

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

Reply via email to