Socket in PHP

Server:

Client:

Commands:

php server.php
php client.php

Reference:

  1. https://www.php.net/manual/en/function.socket-read.php
  2. https://xyz.cinc.biz/2016/12/php-socket-client.html
  3. socket_create() not found
    https://blog.johnsonlu.org/freebsdinstall-php-sockets-so/