closedir

void closedir(resource_pointer dir_stream) 

Destroys resource pointer dir_stream.

Returns:

Nothing

Description:

closedir() is used to destroy resource pointers that have been returned by calls to opendir().

Note:

Calls to this function are generally unnecessary, as open directory streams are automatically closed at the end of a PHP script.

Version

From versions 3.0 and 4.0

Example:

Close a directory stream
closedir ($directory_stream); 

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.