Skip to main content
1 of 4
flu
  • 14.9k
  • 8
  • 79
  • 73

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.

flu
  • 14.9k
  • 8
  • 79
  • 73