可能重复:
我如何理解嵌套的?:PHP 中的运算符?
为什么会这样:
$object->customer->phone =
! empty( $object->customer->address->phone_fixed ) ?
$object->customer->address->phone_fixed :
! empty( $object->customer->address->phone_mobile ) ?
$object->customer->address->phone_mobile :
! empty( $object->customer->address->phone_business ) ?
$object->customer->address->phone_business : '';
返回$object->customer->address->phone_business
,即使$object->customer->address->phone_fixed
已设置且不为空?
谢谢你。