close

(4.0.2 - 4.0.6 only)

close -- Closes a file descriptor

Description

bool close (resource socket)

Warning

This function is EXPERIMENTAL. That means, that the behaviour of this function, this function name, in concreto ANYTHING documented here can change in a future release of PHP WITHOUT NOTICE. Be warned, and use this function at your own risk.

close() closes the file (or socket) descriptor given by socket.

Note that close() should not be used on PHP file descriptors created with fopen(), popen(), fsockopen(), or psockopen(); it is meant for sockets created with socket() or accept_connect().

Returns TRUE on success, or FALSE if an error occurs (i.e., socket is invalid).

See also bind(), listen(), socket(), socket_get_status(), and strerror().