Hacker News new | ask | show | jobs
by rprime 3328 days 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.
1 comments

doing 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.

It 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

I 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_. :)