Ratchet. People knock PHP for all the bad things it does. But getting the WebSocket example running, actually wasn't that bad. Apparently Apache doesn't play nice with Ratchet (not sure about pure WebSockets) so you have to use the built-in PHP server which comes with PHP 5.4.
The app I made is pretty much a copy paste from the Rachet Hello World Example but tried to make the simplest chat app I could. The server is actually pretty close the Hello World code, just with a bunch of extra client-side javascript.
Once you download the app, if you have PHP properly installed and in your path, you can use php bin/chat-server.php
in the root folder to start the server. You can then hit the index page and see the green connection message. You will also see some information in your terminal.
You can then open a new browser (or incognito/private window) and "create" another user to chat with.
You can see your messages going back and forth. Pretty slick. With the way I develop things at WARPAINT Media, I really can't wait to create some sites and apps that use the WebSocket server.
I'm a full-stack developer, co-organizer of PHP Vancouver meetup, and winner of a Canadian Developer 30 under 30 award. I'm a huge Open Source advocate and contributor to a lot of projects in my community. When I am not sitting at a computer, I'm trying to perfect some other skill.