PHP Manual
Prev |  | Next

# socket_close

(PHP 4 >= 4.1.0)

socket_close -- Closes a socket descriptor

## Description

``bool soclet_close` (resource socket)`

Warning
This function is EXPERIMENTAL. The behaviour of this function, the name of this function, and anything else documented about this function may change in a future release of PHP without notice. Be warned and use this function at your own risk.

socket_close() closes the file (or socket) descriptor given by `socket`.

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

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

See also socket_bind(), socket_listen(), socket_create(), socket_get_status(), and socket_strerror().

Prev | Home | Next
socket_bind | Up | socket_connect