Follow

WTF. One of the missing pieces I hate about PHP -- "$x = $y || $z" -- actually exists after all, it's just "$x = $y ?: $z".

I never see anybody using it in code. I didn't know it existed. Most discussion of it are just asides in discussions about the "ternary operator".

But it's been around for lots and lots of years -- since PHP v5.3.

Weird.

Sign in to participate in the conversation
dice.camp

A Mastodon instance for tabletop gamers.