PHP 4, PHP 5, PHP 7, PHP 8
dir - Return an instance of the Directory class
dir( string$directory, [resource|null$context = null] ): Directory|false
A pseudo-object-oriented mechanism for reading a directory. The given directory is opened.
Directory to open
A context stream resource.
Returns an instance of Directory, or false in case of error.
The order in which directory entries are returned by the read method is system-dependent.
|8.0.0||context is now nullable.|
Show all examples for dir