xxxxxxxxxx
($var > 2 ? echo "greater" : echo "smaller")
xxxxxxxxxx
$thisVar != $thatVar ?: doThis();
or
($thisVar == $thatVar) && doThis();
or
if ($thisVar == $thatVar) doThis();
xxxxxxxxxx
$condition = true;
$result = ($condition) ? 'Condition is true' : 'Condition is false';
echo $result;