return true ? 'a' : false ? 'b' : 'c';
This should return 'a', but it doesn't. It returns 'b' instead. Is there a bug in PHP's order of handling the different parts of the conditional operators?
I got the idea from Are multiple conditional operators in this situation a good idea? where it does seem to work correctly.
(the true and false are for the purpose of the example, of course. in the real code they are statements that evaluate to true and false respectively. yes, i know that for sure)