I was asked to perform this operation of ternary operator use:
$test=\'one\'; echo $test == \'one\' ? \'one\' : $test == \'two\' ? \'two\' : \'three\';
Ternary operators are executed in order of appearance so you really have:
echo ($test == 'one' ? 'one' : $test == 'two') ? 'two' : 'three';