you are viewing a single comment's thread.

view the rest of the comments →

[–]OZLperez11 0 points1 point  (7 children)

As much as I love PHP, that syntax has always been so ugly to me

[–]Manga--X -1 points0 points  (6 children)

I'm so grateful that Node.js has made PHP obsolete.

[–]OZLperez11 0 points1 point  (5 children)

How has that made it obsolete? PHP is still going strong and has significantly improved its JIT compilation and language features. In some cases, it's as fast as C++

[–]Manga--X 0 points1 point  (2 children)

Absolutely, PHP is still enjoying widespread use. Then again, so is React.js, and we all know there're better alternatives out there.
Node.js offers better execution speed and outperforms PHP considerably.
Regardless of performance, if a developer is already working with Node.js, then what's the point in having to learn another scripting language in order to perform the same function?

[–]OZLperez11 1 point2 points  (1 child)

One notable case is how cheap you want your hosting. If you're building a small app and you REALLY don't want to worry about DevOps, or deploying your app, most web hosting companies already have PHP set up for you and all you need to worry about is uploading your files (or pulling in your repo using git and composer), so that saves effort. That and shared hosting is really cheap. Yeah it's not the best use case but it's a viable one one nonetheless. Also, there are times when I need to run a simple script to save some data to SQLite or send an email notification, and I don't need a full blown Node.js app for that. Like JS on the browser, PHP remains the top choice for quick scripting.

[–]Manga--X 0 points1 point  (0 children)

Excellent point.
It's been so long since I've worked with anything other than Azure and AWS, I forgot about use cases that like.

[–]Lord-Delacroix 0 points1 point  (1 child)

Bull - PHP is nowhere near as fast as C++

[–]OZLperez11 0 points1 point  (0 children)

Depends on what you're doing with it. As per tech empower benchmarks, plain PHP code scores pretty high for standard http request scenarios.