glob() With Hidden Files

../_images/glob_with_hidden_files.png

By default, the glob() function lists only files that don’t start with a dot .. This means that the hidden files, on Linux, are not listed.

With the GLOB_BRACE option, it is possible to list all files, and even filter out the ever present ‘.’ and ‘..’.

See Also

PHP Features