AlmightySnoo 🐢🇮🇱🇺🇦@lemmy.world to Programmer Humor@lemmy.ml · edit-22 years agoand people wonder why we say PHP is a memelemmy.worldimagemessage-square41fedilinkarrow-up1205arrow-down120
arrow-up1185arrow-down1imageand people wonder why we say PHP is a memelemmy.worldAlmightySnoo 🐢🇮🇱🇺🇦@lemmy.world to Programmer Humor@lemmy.ml · edit-22 years agomessage-square41fedilink
minus-squaredot20@lemmy.worldlinkfedilinkarrow-up13·2 years agoAh, I understand now. The expression is evaluated like this: $a == 1 ? "one" : $a == 2 ? "two" : $a == 3 ? "three" : "other" $a == 2 ? "two" : $a == 3 ? "three" : "other" "two" ? "three" : "other" "three"
Ah, I understand now. The expression is evaluated like this:
$a == 1 ? "one" : $a == 2 ? "two" : $a == 3 ? "three" : "other"
$a == 2 ? "two" : $a == 3 ? "three" : "other"
"two" ? "three" : "other"
"three"