?:
Can someone explain to me why the following code yields output "20 < x
<= 30"?
echo $x > 30 ? "x > 30" : $x > 20 ? "20 < x <= 30" : "x < 20";
I expected that ir will be evaluated as ($x > 30 ? "x > 30" : ($x > 20 ?
"20 < x <= 30" : "x < 20")) but I was wrong.
|