I was asked to perform this operation of ternary operator use:
$test=\'one\'; echo $test == \'one\' ? \'one\' : $test == \'two\' ? \'two\' : \'three\';
Nested ternary operations are gross! The above explanation shows why.
Basically this is the logic:
is $test == 'one' if TRUE then echo 'one' else is $test == 'two' if TRUE then echo 'two' else echo three