I use:
$isDirEmpty = !array_diff(scandir($dir), array('.', '..'));
Since glob only finds hidden files if you explicitly ask it for this seems to be the easiest way.
I use:
$isDirEmpty = !array_diff(scandir($dir), array('.', '..'));
Since glob only finds hidden files if you explicitly ask it for this seems to be the easiest way.