Home > Article > Backend Development > 三元运算问题
$str = true?8888:true?100+100:100000000;echo '<br/>',$str;
$str = true?8888:(true?100+100:100000000); echo '<br/>',$str;
$c=1;$d=1;$str = true?8888:(true?$c++:$d++); echo $c,"<br/>";//1echo $d,"<br/>";//1echo '<br/>',$str;//8888
$str = (true?8888:true)?100+100:100000000; echo '<br/>',$str;// 200
23$str = (true?8888:true)?100+100:100000000; echo '<br/>',$str;// 200