Left Associative Ternary in PHP

PHP has left associative ternaries instead of right associative ones like most other languages. Throwing in brackets on the right hand ternary fixes it. 

Apologies for the incorrect commit description, I got my left and right confused for a moment. ;)