It should be run from the command line, because, as you suspected, it should work endlessly. It binds to a socket on the server and listens for incoming connections. It cannot be reliably launched from the browser.
The -q option indicates that it does not display any browser headers, such as X-Powered-By: PHPorContent-Type: text/html
, PHP, . . , , . select, .
, , , , , , , .
, URL- WebSocket ws://localhost:12345/websocket/server.php. -, WebSockets, - phpWebSocket, , 80.
, .