AlmightySnoo 🐢🇮🇱🇺🇦@lemmy.world to Programmer Humor · edit-22 years agoand people wonder why we say PHP is a memelemmy.worldimagemessage-square114fedilinkarrow-up1403arrow-down141
arrow-up1362arrow-down1imageand people wonder why we say PHP is a memelemmy.worldAlmightySnoo 🐢🇮🇱🇺🇦@lemmy.world to Programmer Humor · edit-22 years agomessage-square114fedilink
minus-squareLemmypy@feddit.nllinkfedilinkarrow-up18·2 years agoFinally got it… $a == 1 ? "one" : ( ( $a == 2 ? "two" : $a == 3 ) ? "three" : "other" )
minus-squareWorthstream@lemmy.onelinkfedilinkarrow-up1·2 years agoYep, any non empty string is truthy.
Finally got it…
$a == 1 ? "one" : ( ( $a == 2 ? "two" : $a == 3 ) ? "three" : "other" )
because “two” is a truthy value?
Yep, any non empty string is truthy.