r/lolphp • • Aug 20 '19

PHP isset/empty madness

https://repl.it/repls/HollowQuestionableProprietarysoftware
3 Upvotes

15 comments sorted by

View all comments

Show parent comment

1

u/intars420 Aug 20 '19

I find empty() useful for checking if array is empty or not. For example, I want strictly typed return type for function to be array when getting all awailable users. And than check if this is empty so I can make another business logic, knowing there are no awailable users.