三元运算符嵌套问题

错误写法:$a==true ? 1 : $a==false ? 0 : 1

正确写法:$a==true ? 1 : ($a==false ? 0 : 1)

原文地址:https://www.cnblogs.com/shier-dong/p/15048699.html