Hmm... I think the best you could do with PHP with stuff like this is by using it as some sort of core layer to build a Javascript on top of it that will handle all the I/O. PHP is good at keeping track of stuff, but I'm not so optimistic about its abilities to react immediately to user input.
__________________
|