socket_close

(PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8)

socket_closeCloses a Socket instance

Description

socket_close(Socket $socket): void

socket_close() closes the Socket instance given by socket.

Parameters

socket

A Socket instance created with socket_create() or socket_accept().

Return Values

No value is returned.

Changelog

Version Description
8.0.0 socket is a Socket instance now; previously, it was a resource.

See Also