To transfer real-time data/ notifications you either need to continuously hit the web-server to get the latest notifications or establish a web-socket between server and client.
Hitting web-server is poor in terms of performance especially in PHP, if taken causally. So, the next option is to use Web Sockets.
You mentioned both PHP and Node..
So, if you are using PHP Ratchet is a beautiful library for web-sockets in PHP.
For node express-ws works great as already pointed out by Anuj Sharma