This rule would favor the "a ? : b" notation - which has
been supported by GCC for at least five years.
My personal reasons against ?: :
- It's non-standard and not well known even though GCC supports it.
- It's hard to look up.
- It's easily confused with $a ? $b : $c;
- It's ugly (-:C
Yeah all good reasons against.
Maybe i could add that GCC's ?: is different from the intended behavior
because we are doing "isset($a) ? $a : $b" in contrast to "$a ? $a : $b"
Looks like you guys misunderstand (my reply was to Rasmus
regarding the don't-make-up-new-operators guideline). My
original proposal (which dates back a couple of years) was
adding GCC semantics to PHP's tertiary operator. The
isset-thread is a separate issue.
- Sascha