… a long time ago 2015-03-28 11:58 @ php.net (this is just a copy for me)

In this documentation page i see things for to hide hidden files (also for opendir() or readdir() …. this should be mentiond all there

// not hidden but on most OS systems Win, *nix, OSX..
if ($file == '.' || $file == '..') {
     // "." current dir info,
     // ".." dir above info,
# or

if $name[0] === '.' // NOT OK FOLKS

„… and then came Polly.avi“ is the title of the Movi. What do you do then?

Windows does it different with hidden files than unix based systems.

For unix based systems something like this should work:

if (preg_match('/^(\.\w+|\.$|\.\.$)/i', $location)) {
/* is hidden:
// must be ok: "..some thing", "... some thing"

I know you do it (if $name[0] === ‚.‘ ) because it is much faster. But it is NOT correct and some day you miss things like me today 🙂