I would suggest using nodejs, together with socket.io, the industry mix-browser compatible web electrical sockets style library. It causes it to be rather easy to create code which conveys using the server (==nodejs) instantly. It uses web electrical sockets in browsers which support them, or any other technologies in browsers which don't.
Only a note regarding PHP because you pointed out it... It's not so appropriate with this for me, since, to be sure, a PHP script only lives the amount of the request. This behavior causes it to be hard to implement real-time communication, unless of course you roll your personal server with PHP, missing Apache or such entirely.
Another alternative might be using Python, and possibly something similar to Twisted, although you may want to implement websockets or such yourself.