Yes please find information at:
(1) http://php.net/manual/en/sockets.examples.php
(2) As well as can Creating Real Time Applications with PHP and WebSockets
PHPWebSockets is a WebSockets server written in PHP (https://github.com/ghedipunk/PHP-WebSockets).
The WebSocket server itself is a class that can be extended to write the rest of the application. The WebSockets.php is the base class and we need to extend that class to write our own simple WebSocket server application. The WebSockets.php base class does the socket management and WebSocket handshake.