I\'ve been programming in PHP for years now, but I\'ve never learned how to use any shorthand. I come across it from time to time in code and have a hard time reading it, s
PHP 5.3 introduced:
$foo = $bar ?: $baz;
which assigns the value of $bar to $foo if $bar evaluates to true (else $baz).
$bar
$foo
true
$baz
You can also nest the ternary operator (with proper use of parenthesis).
Other than that, there is not much else about it. You might want to read the documentation.