My brain’s telling me there isnt a short(er)hand way of doing this, but I figured i’d throw it out and see if i’m just having a forrest for the trees moment.
What’s the shortest way to combine a null coalesce and increment?
IE: If I have a key for my array that may or may not exist, what’s the shortest I can either increment or set to 1.
My current line is:
$result[$status] = ($result[$status] ?? 0) + 1;