Now I come to a funny position where I used PHP for the template building on Pizzuno's frontend, but for the backend, I don't use PHP but NodeJS instead.
There is not only one reason why I opted for NodeJS over PHP but many.
I needed operations to run in a non-blocking way (async)I know is possible in PHP but I didn't have time to struggle with the preparation of the environment on PHP to make it possible. On NodeJS this is out-of-the-box and really easy to use.
I can share components and classes between the frontend and the backendSince both, runs on the same language, Javascript. This makes the socket communication way easier and the roll-out of new features and maintenance easier.
Performance in a low-cost server!Since PHP relies on an Nginx or Apache to run under an HTTP/HTTPS server, I would ideally use some sort of a Kubernetes or Docker-compose solution to orchestrate PHP-FPM + Nginx (or Apache). This would add a lot of overhead to my 512MB server. NodeJS can serve requests on a production scale straight away by itself, so I wouldn't need Docker or any other orchestration other than PM2 (also kudos for PM2, it's heavenly!).
Small note here: I'm completely aware that I can install PHP and Nginx on my Linux instance, but still I lose the portability, as I have plans to migrate to another cloud.