Supported Versions: PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8
Queries the local side of the given socket which may either result in host/port or in a Unix filesystem path, dependent on its type
<?php socket_getsockname(Socket $socket, string &$address, int &$port = null): bool