Yes, I know this is very bad code, but I'd still like to understand it:
$out = $a > 9 && $a < 15 ? "option1" : $a < 5 ? "option2" : "option3";
$out = $a > 9 && $a < 15 ? "option1" : ($a < 5 ? "option2" : "option3");
If $a
is 11, then the result of the 1st line is "option 2", but in the 2nd line, the result is "option 1" - what effect is the pair of brackets having?