Just a bit of fun, wondered which of these people like best for checking if an array is empty in #php? There's (debatably :D) no right answer...

#1 is short
#2 and #3 are very readable

Leaning towards #2 myself!

Hopefully I typed the example code properly lol. xD

@scottwhat I generally use 1, because I'm lazy. Arguably 3 is most correct(tm). Don't use 2.
@Crell @scottwhat why don't you recommend 2?
@Crell @scottwhat all those tutorials are based on an era before 8.0, implying hardly any type hinting. Code written these days ought to have clear type hinting and using empty on an array in that case makes perfectly sense from a readability side. Then take into consideration performance as well https://stackoverflow.com/a/2216159
Checking for empty arrays: count vs empty

This question on 'How to tell if a PHP array is empty' had me thinking of this question Is there a reason that count should be used instead of empty when determining if an array is empty or not? My

Stack Overflow
@luceos @Crell Interesting stuff, thanks! It's great that PHP offers more strict options now.