The dir() function returns an instance of the Directory class. This function is used to read a directory, which includes the following:
The above example will output something similar to:
Handle: Resource id #2 Path: /etc/php5 . .. apache cgi cli