5 ms·
I assume NodeJS is used just as a WebSocket server for their real-time events, doing that in PHP would be a bit uncomfortable.
by rprime 9y ago
I assume NodeJS is used just as a WebSocket server for their real-time events, doing that in PHP would be a bit uncomfortable.
- icebraining 9y agodoing that in PHP would be a bit uncomfortable. Why? PHP works fine as a daemon, there are many servers written in pure PHP, as well as frameworks for "async" programming.
- Shorel 9y agoIt is uncomfortable, sadly. At the very least PHP Ratchet is not quite integrated with Laravel and the easy route is to use Node. https://github.com/laravel/echo https://github.com/laravel/echo
- rprime 9y agoI am not saying that as an attack to PHP (or a defense of NodeJS), I am writing PHP daily, but when it comes to real-time (at least WS systems), PHP would be my last resort, mostly because it lacks any real support for such things, you'll have to force your way in. I guess we come back to _just because you can doesn't mean you should_. :)