優先度、または PHP が式を評価する方法と関係があります。括弧でグループ化すると、問題が解決します。
$myvar = is_object($somevar) ? $somevar->value : (is_array($somevar) ? $somevar['value'] : '');
ここのメモを参照してください: http://www.php.net/manual/en/language.operators.comparison.php#language.operators.comparison.ternary
ノート:
三項式を「積み重ねる」ことは避けることをお勧めします。単一のステートメント内で複数の三項演算子を使用した場合の PHP の動作は、自明ではありません。
Example #3 自明でない三項の振る舞い
<?php
// on first glance, the following appears to output 'true'
echo (true?'true':false?'t':'f');
// however, the actual output of the above is 't'
// this is because ternary expressions are evaluated from left to right
// the following is a more obvious version of the same code as above
echo ((true ? 'true' : false) ? 't' : 'f');
// here, you can see that the first expression is evaluated to 'true', which
// in turn evaluates to (bool)true, thus returning the true branch of the
// second ternary expression.
?>