A socket is the backbone of network communication, it establishes the connection between client and server, as well as messages transmission between them.
In PHP, the socket extension implements a low-level interface to the socket communication functions based on the popular BSD sockets, providing the possibility to act as a socket server as well as a client.
Check if Sockets Support is enabled
phpinfo() function displays information about Sockets. The state is determined by whether Sockets Support is enabled or disabled.
How to enable Sockets support in PHP ?
Socket extension is packed into PHP when it is installed. However, this extension is not enabled by default. You need to enable it to start using PHP’s socket functions.
The name of this extension is
php_sockets.dll. It can be found in
To enable sockets, you need to add the following line to