DEV Community

Discussion on: PHP... yay or nay?

Collapse
 
_ezell_ profile image
Ezell Frazier • Edited

I started off with PHP, but prefer Node over it and just about anything else imo.

The pros of PHP as well as just about any other server-side language over Node is short and sweet; better built-in methods. String methods, object methods, etc.. JS is rapidly catching up here, but if I found myself wanting more for less, I'd probably move over to Python.

Anyways, PHP is fine for most use-cases, but I've come to love Node for a few things:

  1. NPM (there's just about a package for anything)
  2. The .js file IS the server (no need for Apache/Nginx)
  3. TypeScript
  4. Inherently asynchronous (it takes a lot for the server to block requests)
  5. It's generally the default/starter tech for cloud function services (firebase)
  6. Native server-side rendering support for front-end libraries (vue, react)

The combination of the above points are why I struggle to find much of a reason to use PHP or any other server-side languages.

But if the use-case is to simply model and serve content, just about any language will do the job, including PHP.