AlmightySnoo 🐢🇮🇱🇺🇦@lemmy.world to Programmer Humor@lemmy.ml · edit-22 年前and people wonder why we say PHP is a memelemmy.worldimagemessage-square115fedilinkarrow-up1337arrow-down130
arrow-up1307arrow-down1imageand people wonder why we say PHP is a memelemmy.worldAlmightySnoo 🐢🇮🇱🇺🇦@lemmy.world to Programmer Humor@lemmy.ml · edit-22 年前message-square115fedilink
minus-squareLemmypy@feddit.nllinkfedilinkarrow-up16·2 年前Finally got it… $a == 1 ? "one" : ( ( $a == 2 ? "two" : $a == 3 ) ? "three" : "other" )
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.