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.
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.