socket_close

Closes a Socket instance

Description

void socket_close(Socket $socket)

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

  • socket_bind
  • socket_listen
  • socket_create
  • socket_strerror